How to use esp8266 with arduino mega

I just bought a ESP8266-01 module…

I found a lot of connection between mega and esp8266, but dun know which one is correct…
I also dun know how to update the firmware…

I only want to do a project to read temperature (thermistor) and send it to the Thingspeak platform through esp8266

Who know how to do it? Pls share with me,tq