Connecting input shield without stacking?

Hi,
I'm pretty new to this stuff, so I was wondering if I could get some help. I have an uno r3 with a motor shield stacked on it, with two dc motors attached. I want to be able to control the motors by using the input shield, but from a distance, several metres away. Can I use wires to connect the stacking headers and pins, instead of plugging them in directly?
Thanks in advance.

The long wires should really be between shield and motors, not Arduino and shield...

Can have short wires between the arduino & shield, and then long wires out to the motor.
Lets you de-condflict pins between duplicate shields if needed also.

fungus:
The long wires should really be between shield and motors, not Arduino and shield...

Oh yeah... that didn't occur to me. Thanks, this solves the problem nicely.