Pakistan were 214 for eight in their second innings at the close, a lead of 281 runs, after leg-spinner Shah took six for 72 in England’s first innings 272.
But at stumps he was shaking hands with Chris Woakes after the Warwickshire all-rounder had taken five for 31 to follow the lively paceman’s Test-best haul of six for 70 in Pakistan’s first innings 339.
Woakes’s 11-wicket haul was the first time he had grabbed at least 10 in a Test match.
England now need to at least equal their record fourth-inning score to win a Test at Lord’s of 282 for three against New Zealand in 2004 if they are to go 1-0 up in this four-match series.
Sarfraz Ahmed (45) and Shah, promoted from his first innings position of number 11, frustrated England in a seventh-wicket stand of 40. Both batsmen were dropped off the luckless Steven Finn as the fast bowler went wicketless on his home ground.
Shah was on two when he chipped Finn out onto the offside and a diving Stuart Broad just failed to cling on to a tough low chance.
But Ahmed should have been out for 36 when Finn took the outside only for wicket-keeper Jonny Bairstow, going to his right, to drop the chance as the ball hit his wrist.
Fortunately for England, it was not too costly a miss with Woakes producing even simpler chances that Bairstow held to get rid of both the gritty Ahmed and Wahab Riaz (nought).
But Finn knew it wasn’t his day when Shah, on one knee, hoisted him for four high over deep square leg.
Pakistan were 40 for one at lunch after Mohammad Hafeez had carelessly fallen for a duck in cutting Broad straight to Joe Root at second slip.
But they lost opener Shan Masood soon afterwards when the left-hander, once more fallible outside off stump, flat-footedly edged Woakes to England captain Alastair Cook at first slip.
Azhar Ali (23) then fell lbw to a desperately tight umpire’s call as Woakes reduced Pakistan to 59 for three.
Misbah, in his maiden Test knock at Lord’s, had made 114 in Pakistan’s first innings. But on Saturday he fell for nought when he lofted off-spinner Moeen Ali legside and Alex Hales, running round to the mid-wicket rope, held a good catch.
Pakistan had never previously lost a Test when Misbah had made a hundred and never won one when he had made a duck but one of those records was now under threat.
The unsettled Younis Khan played on to Ali for 25 two balls after driving him for four. Asad Shafiq struck a well-made 49 before,in sight of his second fifty of the match, he was bowled by a Woakes ‘trimmer’.
Earlier, Shah produced the best innings bowling by a visiting spinner against England in a Test at Lord’s since Sid Pegler’s seven for 65 for South Africa back in 1912.
Variations in pace and flight saw Shah repeatedly pose problems on an unresponsive pitch.
Both sides knew that Shah was likely to be an even greater threat on a wearing fourth-day surface on Sunday.
England resumed on their overnight 253 for seven, after Shah induced a middle-order collapse on Friday.
They added just 19 more runs Saturday, with Woakes on 35 not out as he emphasised his all-round credentials.