On this topic https://www.arduino.cc/en/Guide/GSMShieldLeonardoMega, they also advise to bend the male header attached to pin 2 on the GSM shield to the side so it does not connect to the Mega.
Did you also tried this kind of sketch:
#include <SoftwareSerial.h>
SoftwareSerial gprs(10, 3);
void setup()
{
Serial.begin(19200);
gprs.begin(19200);
}
void loop()
{
if (gprs.available()) Serial.write(gprs.read());
if (Serial.available()) gprs.write(Serial.read());
}
and send the AT commands on the serial console
AT
OK // The module is responding
AT+CPIN? //Check CPIN
+CPIN: READY // SIM card is unlocked
+CPIN: SIM PIN // PIN number is required
OK
AT+CPIN="XXXX" // if PIN is required (replace XXXX by your number)
OK
AT+CGATT? // Check the module is attached to the network
+CGATT: 1
OK
AT+CIPSHUT // Destroy PDP context
OK
AT+CSTT="apn","user","password" // Create PDP context with your provider
OK
AT+CIICR // Bring up the GPRS connection
OK
AT+CIFSR // Get your IP
xxx.xxx.xxx.xxx