How to make a DC motor act as some sort of switch

Use a relay as a switch instead of a rotating motor

Are you suggesting using the voltage generated by turning the motor to energize the relay? - Scotty