Quite a simple trick and I've seen quite a lot of people in-game complaining about not being able to shop on SM, while upgrading things.
~~~~~~~~The trick~~~~~~~~
Hold the tab key down and then click the npc. Quite simple!
If you don't know what's the tab key, check this image:
Have fun shopping!