Well that makes it simpler, I think it could be easier if you choose what hotkey first though.
Then you can send them to different stores by what hotkey they chose and have triggers saying
IF THEY BOUGHTED THE SPELL
IF THE BOUGHTED THE SPELL FROM THE STORE
IF THE STORE WAS THE W STORE
give them a spell that has a hotkey of w
endif
endif
endif
etc etc etc
But if you do it where they buy the spell first you will need to store the spell in a variable, to save player's space I'd use an integer then when you choose a hotkey just remember,
if spellchose = 1, fireball
if spellchose = 2, thunderamazinglightningattack
if spellchose = 3, givethemacookie
if spellchose = 4, youracheateritakeallyourmoney
so on a so forth like that
btw this is my hundredth post