Let’s say you have your actor/player (could be your camera object), in which you add a game property (Game Logic view).
From there, you can either choose to proceed with python or logic bricks. A simple logic brick setup could for example make use of the near type sensor => [AND] => Property type actuator with (for example) addition mode, your named property (could be money) and the value you wish to increase with. - Of course, the logic brick approach leaves a lot to be desired and is rather limited.
The python way gives much more freedom to do things. You could start connecting your always type sensor to a python controller which again is linked to a script.
The basic python setup could be:
from bge import logic as G
controller = G.getCurrentController()
owner = controller.owner
owner["Money"] = 100 #Money being the name you game your game property.
#Lets say we want to make let you have some money, a simple function could be:
owner["Money"] += amount #Here we simply add the amount to the current amount of cash
print("You now have: " + owner["Money"] + "bucks") #Here we want to say how much we've got now
Only concept, doesn’t work. - , but it’s the same basic approach. You could also access it from other objects, if you have the current scene declared to a variable and access the property through there, or as Kheetor mentions, make use of globalDict. As for the actual purchase of items in the store, you could probably create your own ID based selection of stuff to buy/sell. - In short, there’s a lot of approaches.
As for restarting the game (I presume you mean to completely close the gameplay instance), I think you’ll need to make use of external text files (as Kheetor mentions). Take a look at the at this: http://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files
Hope it helps