Quoted from rgb635:@hocusiocus using relays and now specially made interfaces such as the T.I.L.T. boards:
https://pinside.com/pinball/forum/topic/tilt-mods-deluxe-bring-your-mods-to-life
it's pretty easy to add anything to a machine now. The question is like you said "when" do I want the feature to activate. I think shakers work good on a periodic bases...just enough to add some kick to the game during a special occurrence but it has to fit the machine also!
I believe this and other mods for adding a shaker to a game operate by way of using the flasher circuit to trigger the shaker.
The PinSound brothers are working on a way to add a shaker to the game and trigger the shaker on virtually any event you want. There has already been one example of a shaker added which is triggered off of that board. I believe they are working on a kit to allow plug-and-play capability, and you can dial in the 'shakes' to your liking