At tea, England were 153 for for four in reply to Pakistan's first innings 339, a deficit of 186 runs.
Cook was 75 not out, having gone past India great Sunil Gavaskar's record of 9,607 runs to become Test cricket's highest-scoring opener.
Jonny Bairstow was unbeaten on one after leg-spinner Shah accounted for Joe Root (48), James Vince (16) and the recalled Gary Ballance (six).
Amir, making his return to Test cricket at Lord's -- the scene of his 2010 spot-fixing crime which saw him given a five-year ban from cricket and a jail term for deliberately bowling no balls as part of a betting scam, opened the attack.
Left-arm quick Amir, who served a five-year ban and was given a jail sentence for his part in the spot-fixing row, should first have had Cook out for 22.
Cook was drawn forward by an excellent delivery only for first slip Mohammad Hafeez to drop the routine catch.
It was a similar story when Cook, now on 55, again edged Amir but wicket-keeper Sarfraz Ahmed, going slightly to his left, floored the two-handed chance.
Amir screamed in frustration before sharing a wry smile with captain Misbah-ul-Haq, who gave the 24-year-old paceman a consoling pat on the back.
After the early loss of opener Alex Hales, Cook and new number three Root shared a stand of 110.
Cook, belying his reputation as a steady run-maker, struck three fours in four balls as Rahat Ali strayed onto the left-hander's pads.
Root joined in with five fours, including a classic straight drive off Rahat.
But Yasir turned the tide after lunch when he had Root carelessly hole out off a miscued sweep.
Earlier, England all-rounder Chris Woakes took a Test-best six for 70 as Pakistan, 282 for six overnight, were bowled out for 339.
Misbah only added four to his overnight 110 not out before he was bowled by Stuart Broad after the 42-year-old had become the oldest player in 82 years to make a Test century on Thursday.
Amir, booed by a small section of a capacity crowd as he walked out to bat, inside edged his first ball in Test cricket in six years, from Broad, for four.
You’ve reached your limit of {{free_limit}} free articles this month.
Subscribe now for unlimited access.
Already subscribed? Log in
Subscribe to read the full story →
Smart Quarterly
₹900
3 Months
₹300/Month
Smart Essential
₹2,700
1 Year
₹225/Month
Super Saver
₹3,900
2 Years
₹162/Month
Renews automatically, cancel anytime
Here’s what’s included in our digital subscription plans
Exclusive premium stories online
Over 30 premium stories daily, handpicked by our editors


Complimentary Access to The New York Times
News, Games, Cooking, Audio, Wirecutter & The Athletic
Business Standard Epaper
Digital replica of our daily newspaper — with options to read, save, and share


Curated Newsletters
Insights on markets, finance, politics, tech, and more delivered to your inbox
Market Analysis & Investment Insights
In-depth market analysis & insights with access to The Smart Investor


Archives
Repository of articles and publications dating back to 1997
Ad-free Reading
Uninterrupted reading experience with no advertisements


Seamless Access Across All Devices
Access Business Standard across devices — mobile, tablet, or PC, via web or app
