Pakistan took a 1-0 lead in the three-match series by beating England by 178 runs Monday in the second test.
England was chasing a record target of 491 for an unlikely win but were bowled out after scoring 312 with 6.3 overs to spare.
England started the final day at 130-3 but lost three wickets in the pre-lunch session, including overnight batsman Joe Root, who was caught in the slips by Younis Khan off Zulfiqar Babar for 71.
Adil Rashid made 61 on a deteriorating track, his maiden test 50 in a career that is only two matches old, before becoming the last man to depart, caught by Babar in the covers off Shah.
Brief Scores
Pakistan: 378 & 354/6 dec beat England: 242 & 312 by 178 runs.