Lets say that you are putting up a rfp for a software project and you have clearly defined the scope and budget. How do you plan the payouts/milestones such that the freelancer does not desert you halfway or deliver a product half complete or full of bugs? Legal course isn't an option either.
I don't think you can.
Much like hiring a contractor to remodel your kitchen.. there's no way to know if they will complete the job and do it satisfactorily.
You simply have to check references and work history and ultimately have a little faith. This is often why hiring experienced, and perhaps more expensive, workers may be better.
Try to find a developer who values transparency and having a short feedback loop - so you can follow the progress closely.
This will enable you to correct misunderstandings early or terminate the project, if it's obvious that satisfactory delivery will not happen.
However, this will also require you being available to answer questions, preferably with short notice or by having short daily/weekly status meetings.