Once you get the ship, the real method (at least the only one I have found that works) is to hold down the X button and press O about 55 times or so. Many people and sites will say that you tap both buttons, but this hasn't worked for me. Once you bring up the slide puzzle game you can get money, potions, antidotes, and gold-needles... all without leaving the ship or risking your party's health.
(My best record is 34.07sec and I have been able to buy whatever I want in every town I have traveled to... so far)