If your Pi has a keyboad, you can also press F4 in Emulation Station to get to its command shell, and then enter sudo nano /opt/retropie/configs/all/autostart.sh to edit the file. In the editor, press Ctrl+xfollowed yand Enter to leave and save the file (or press n to not save it). You can leave the command shell by entering exitor pressing Ctrl+d.
Finally, you can also use SSH (Secure Shell) to access your Pi. See the Docs about that.