Arduino UNO + Motor Shield Power problem

from a 9V battery

What kind of 9V battery? Not a smoke detector battery, I hope.

the robot goes "crazy"

No clue as to what "crazy" means. Put your hands in your pockets while taking to us. Your handwaving is useless.