Time is only one factor in repairing credit. Plus, if your credit is not good, you could have trouble finding someone to rent to you.
As a rejoinder to what Marsha has already mentioned-- that rent to option will give time to build your credit score and save up money for your down payment, your option money you will put in will be accounted towards the closing costs or down payment for your future mortgage-- if this is how it will be written on the agreement.
Please, when you enter into this type of lease or arrangement, have an attorney review the documents before you sign it. Normally, if you back out of the agreement and decide not to buy the house after the lease expires, you will lose the option money.
Best of Luck.