Shaker
The Shaker effect allows you to generate shaking.
Here is an exemple, the famous San Andreas earthquake fault line (you can download the project here) :
Here are the steps you can follow to generate this earthquake effect:
Set the total length of scene to 96 frames (4 seconds)
1.) Set X and Y values to 0 on frame 1 and on frame 20 so at the beginning so the image is held still with no shaking.
2.) Set X and Y values to 10 on frame 40
3.) Set X and Y values to 5 on frame 72 (this allows for continued shaking ,but gradually diminishing from frame 40 - 72)
4.) Set X and Y values to 0 at frame 85 and 0 on frame 96 . (this allows the shaking to continue to diminish on frame 72 - 85 , and the image is held still from 85 - 96).