How do I connect a motor shield and an HC-SR04 Sensor to the Arduino Uno?

I can connect the HC-SR04 Sensor to the Arduino without the motor shield and am using the Digital 12 and 13 pins, the GND pin and the 5V pin. When I try to put the motor shield in, the motor shield almost takes up all the pins and I can't fit the sensor and the motor shield in at the same time.

Motor Shield: Arduino L293D Motor Drive Shield - emartee.com

HC-SR04 Sensor: http://www.amazon.com/SainSmart-HC-SR04-Ranging-Detector-Distance/dp/B004U8TOE6

Thanks.

Edit: I have found out that Digital pins 2, 13, and all the analog pins are not used, but where do I connect the voltage and the ground pins? I have tested it and it doesn't work.

Look at the 6-pin header in the shield corner. The signals you need are in that header.