Ah guys, in times of script-based RPG Maker versions, noone should be left with eventing shop systems anymore... especially since it involves barely any scripting if you just want to enable/disable the buy and sell options. I'd do it like this:
First, you need a range of states your shop system can have, for example:
0 - buy and sell
1 - buy only
2 - sell only
You pack that into a variable, meaning before your Shop call with event commands, you place a call script event command and set $game_system.shop_type = AnInteger, namely to one of the above three numbers.
To not get a syntax error from that, go to Game_System in your script editor, and look for the first section where it says "attr_accessor" quite a few times. Add attr_accessor :shop_type underneath all of them.
Now find the initialize section, storing a number of variables starting with @s. Add your own one underneath, like this: @shop_type = 0.
You just created an operable variable within the Game_System class (referenceable by $game_system) that's default value is 0 and that's allowed to be modified from other classes (which is what we need the attr_accessor for).
Now you need to modify your shop system within Scene_Shop. Now this depends on the RM version you have (XP or VX), so I can't really help ya out from here without knowing that. You can try to figure it out yourself by looking at the code though - it's not hard!
Good luck.