Following on ESP8266 Board pins, how do they map on the motor shield?
You see the pins marked PWMA, PWMB, DA and DB? Those are the pins that control the motors (PWMx is the speed, Dx is the direction). Whatever pins on your ESP8266 board plug into those holes are the pins you need to use in your code. How those pins map to names and numbers in the Arduino API depends entirely on what the board is you're plugging in and what the author of the board definition files was thinking at the time. 

In short, look at your board (which we cannot see) and see what GPIO pins are in the same location as the pins I pointed out. Then control those pins in your software.