Maybe Orthotics. It sounds like you may have a biomechanical instability in your feet that is passing problems "up the kinetic chain." custom made prescription orthotics, made by a certified lab, under the recommendations of a podiatrist can help tremendously!
See doc. See a podiatrist for your foot pain. The back and thigh issues could be secondary to compensation from walking differently. A physiatrist can help and work in conjunction with your podiatrist. Physical therapy can help but you need to find the cause of your pains first and correct and structural issues.