Here is a circuit for a fan controller that shows one way to wire it up:http://ruggedcircuits.com/html/circuit__7.html
This design uses a MOSFET transistor (drain/gate/source), though you could also use a BJT (collector/base/emitter).
An important question is what you are doing with the 12V PWM signal. Will it be required to supply/sink a lot of current? If it is not an inductive load then you can omit diode D1 in the circuit.
The Quick Shield
: breakout all 28 pins to quick-connect terminals