Ok the sketch looks good now.
From the Sparkfun guides check (don’t change) which version of the AT firmware you have on the ESP shield.
Scrap that last sentence.
Just seen your last edit, Ready (ping: 22ms) means you have connected!
Sometimes you get lucky and the code forces it’s way passed the echo problem.