Shahzad made 115 runs from 104 balls as Pakistan posted 268-9 in its 50 overs after being sent in to bat on a slow pitch.
New Zealand's stand-in captain Ross Taylor top-scored with 69 runs and Martin Guptill made 65 as the Kiwis were dismissed for 227 in the 47th over.
Pakistan has secured an unbeatable 3-1 lead with one match to play.