Open the Calliope mini online editor, click on Add Package add the pxt-calliope-esp package.
Alternatively just load the attached hex file into the editor (drag and drop it onto the editor) and the add-on will be loaded automatically. You can then modify your wifi network name and password and start sending.
⚠ The ESP8266 will need an external power supply capable of providing up to 300mA. If you try to directly use it with the Calliope mini, it will not connect and the Calliope mini resets due to too much power drawn.
You may want to update the ESP with the latest firmware. The add-on requires at least v2.0 of the AT command firmware. You can find the firmware download link here: http://www.electrodragon.com/w/ESP8266_AT-Command_firmware under Espressif AT Commands Firmware.