ESP13Shield + Arduino Mega 2560 problem

Some of those shields are shipping with the AT firmware instead of the DOIT firmware. So just do some research about the ESP8266 AT firmware and forget about the firmware documentation at that link (you can still use the hardware documentation). You need to be aware that the shield is connected to the Mega via Serial (pins 0 and 1). For this application I recommend this library: