As a gesture to invoke the Undo command, shaking a handheld device the size of an iPhone is clever and workable. Shaking a much larger device like the iPad is awkward at best
My iPad has an undo button on the keyboard (and even a redo one) and shaking it produces no result. Either our two iPads are different, which I don't think, or that's just a statement that the author did not bother to verify.
I would never do this though - you seem to have to do it pretty quickly, much easier to just hit the "undo" button.