You’ll find es_input in /home/pi/.emulationstation/
You need to have this line in es_input:
<input name=”menu” type=”button” id=”5″ value=”1″ />
You’ll need to replace the id value (currently 5) with a value that corresponds to the button on your gamepad.
After you set this line restart Emulation Station.