***** Does not name a type

I'm going to guess that you didn't install Adafruit_MotorShield library correctly.

Please post the whole error message.

Edit: your highlighted code is not in a function.
You need to fix that.