There is no magic pill however, anti-inflammatories may help alleviate any swelling that causes pain such as capsulitis at the ball of the foot.
However, pills do not correct the problem which is the structure fault in your foot. The foot needs more support to reduce pressure on the bones. The best medicine is orthotics
to support the arch like a bridge to realign the bones in your feet.