Wiring a linear actuator with external power source - 3 wires.

Something in this ballpark?

I'm having trouble realizing, where i connect: The ohm-resistor, the red wire and the transistor emitter?

Your help is much appreciated!