I was talking about using the switch to wake the microcontroller up from sleep via a pin change or level interrupt. You just set the pin to INPUT_PULLUP mode and then connect the switch from the pin to ground. Inside the switch is a spring that closes the switch momentarily when shaken and triggers the interrupt.
There are a variety of these sensors available. The link I posted was just the cheapest one to pop up in my search. I actually haven't tested that style yet. I did try out a few of the other common ones and I found that these were more sensitive to vibration:
And these were less sensitive:
You could also decrease sensitivity in code by requiring multiple triggers from the sensor or it can also be done via hardware.