Just remove the pump, unlock it (if it’s locked), then hold the pump head in your desired position while tightening the pump neck back onto the bottle.
Watch this video to see a demonstration: