Take action on the purchase as soon as you can so you can lock in an interest rate SOON. Rates are starting to tick up a bit.
Sellers may not trust payment with low/bad credit scores/foreclosure/bancruptcy.
Renting and repairing credit may therefore be the only option.
Use a buyer's agent for your best option and representation. (The seller is probably professionally represented. You should be too.)