You can check the game I ported to the Esplora which uses the accelerometer. Writeup is at http://21stdigitalhome.blogspot.com/2013/01/first-self-contained-arduino-esplora.htmland the code at https://github.com/TheKitty/EsploraApps

The game saves all the values: x, y, and z but I think it actually only processes the x values - if you shake one way it moves the ball in the direction of the shake along thepositive or negative x axis. It uses the Esplora.readAccelerometer function, documentation at http://arduino.cc/en/Reference/EsploraReadAccelerometer. I found that the movement was opposite of what the Esplora library thought was positive so I multiplied by negative one to change it.

If you've done accelerometer controlled gaming/programming before, it is straightforward. I hope this helps.