There an awsome tutorial the zelda rpg inventory here that can do basically the same selector There will be alot of X and Y math that we will have to figure out.
AS for the button press when near is that you can do a overlapping sprite condition with the button is down.
And for the the certain amount of times. you would have to have a global variable for each item and set it to the max number of available quantity.
But I am thinking that you would want the shop to have a recharge effect so that after time passes you can revisit shop to get more of the items. This part i do not know how to do it.
basically The shop you want is just an inventory with cost to buy from. So again go look at the zelda rpg inventory tutorial here : https://www.scirra.com/tutorials/670/ze ... e-easy-way
Now i have a question for you, I did look at the awsomenaut shop picture, do you want the shop to be pull up as like an overlay while the background fades like as in like a layer effect or do you want to do a new layout with the shop. and just switch back n forth. The reason is why i am asking because there is a whole new set of code between the two.