A global variable is just a simple data storage mechanism that can be visible to any VI. A shared variable is basically an uber-global variable. It can be single process, networked, or time-triggered. A single process shared variable is basically like a global variable.
There's a ton of stuff that a shared variable can do that a global variable can't. You can read all the gory details
here. The shared variable does have the nice advantage of having error in and error out terminals to allow you to control when you read/write the global variable, but if global variables are used for more complicated things typically one would write wrapper VIs to control access to it.
If you were to change the shared variable that you had created to be a single process shared variable then it probably would have worked, but for what you were doing a shared variable was overkill.