There's a couple of main ways to do this. Firstly, you can store all the values you need, such as the players X & Y values, and simply recall those when you switch back. You'll need to get to grips with attributes to be able to do this.
Another option is to have the shop there on the same scene, but hide it when you don't need it. This might not be suitable if your shop is really complex though, but I'm doing something similar where a journal and inventory slide on and off the screen as needed.