You put this code in Enablebuygun.sqs, yes, but then you execute it from init.sqs (another file you may create in your mission's folder).
init.sqs, if exists in your mission folder, is the very first script to be automatically executed.
For example.
[getPos weaponshop]exec"Enablebuygun.sqs"
If you are not familar with scripting, before you get into any of these, you better check some scripting tuts first.