Before you can use the Motor shield, you must install the AF_Motor Arduino library - this will instruct the Arduino how to talk to the Adafruit Motor shield, and it isn't optional!
Open up the Arduino library manager:
Search for Adafruit Motor library and install it. Make sure it is the library for the V1 motor shield.
We also have a great tutorial on Arduino library installation at: