There are also ICs which can do this: CD4504 and CD40109. A MOSFET driver will also work, such as the TC4423 but is overkill.
It depends on how many channels you require. If it's just one, a couple of transistors is probably more economical, but if you need two or more, consider using an IC.
Here's a non-inverting level shifter, using just two transistors. The downside is the MCU output has to sink all of the output current, plus about 3.5mA, for the biasing resistors, which can be increased, if it doesn't need to source so much current.
Q2, R2 and D1 can be omitted, if the pump's PWM input is happy with a source impedance of 4k7.