Younis Khan and Misbah-ul Haq also hit dominant tons to put Pakistan in control on 566 for three declared. But Shehzad's injury briefly set alarm bells ringing.
In the final over before lunch, Shehzad was hit on the side of the head trying to hook a short ball by New Zealand seamer Corey Anderson on the hard Abu Dhabi wicket.
Shehzad's bat struck the stumps for a hit-wicket dismissal and the dazed batsman fell to the ground before walking off.
Before the drama, he had hit 17 fours and a six in his 371-ball innings.
While team managers worried about the opener, Younis went on to smash an unbeaten 100 -- his 28th Test hundred and fourth in five innings.
Misbah knocked an unbeaten 102, his third ton in three innings. Azhar Ali missed his hundred after he was dismissed for 87.
At the close on the second day New Zealand were 15-0 with Brendon McCullum on nine and Tom Latham on five. They need another 352 to avoid the follow-on.
He hit a century in each innings in the first Test against Australia in Dubai and followed that with 213 in the Abu Dhabi Test last week.
Misbah, who smashed twin hundreds in the second Test against Australia, knocked nine fours and a six off 162 balls.
The two veteran batsmen added 193 for the unbroken fourth wicket stand to build on another second wicket stand of 169 runs between Ali and Shehzad.
