England was bowled out for 156 after lunch as Pakistan jumped to No. 2 in the test rankings with a 2-0 victory in the series.
England captain Alastair Cook stood out against the spinners on a deteriorating wicket before offspinner Shoaib Malik had him stumped for 63 to end up with 3-26 in his farewell test.
Shah and Zulfiqar Babar had pushed England inside first 30 minutes on Thursday when they claimed four wickets and England limped to 59-6.
Cook resisted briefly by combining in a 49-run stand with Adil Rashid (22) before Shah had the last wicket of Ben Stokes.
Pakistan beats England by 127 runs in 3rd test