Let's be clear on something. You can buy a home that
1) is being foreclosed on via an auction. You must buy sight unseen with no inspections and pay cash for this home.
2) has been foreclosed on by a bank. These are also be called REOs. They are listed with real estate agents just like any other house. They're a bigger pain in the tail to buy than an non-REO homes but you can (provided the condition is good enough to qualify for a loan) finance them and obtain inspections.
If you plan to pursue the second option, you definitely want a buyer's agent.