Problems with optical encoder and motor shield.

I'm using this [motor shield](DFRobot Open-Source Hardware Electronics and Kits?
route=product/product&filter_name=motor&product_id=69#.ULVGg4ZxV8E) and there are two power lines, the first 9V for arduino which feeds a servomotor, a ultrasonic sensor and the two encoders, the second for motor shield and motors.

How can i screen the connection from encoders to Arduino?