England lost their last seven wickets for 14 runs after they had looked set to post a total in excess of 200.
Captain Eoin Morgan and Jos Buttler seemed in total control, hitting four sixes apiece in a fourth wicket stand of 96 off 55 balls.
The collapse started when Buttler hit the third ball of the 17th over from Kyle Abbott into the covers where South African captain Faf du Plessis held a low catch, which had to be confirmed by the television umpire.
New batsman Ben Stokes thrashed the next ball straight back at Abbott, who deflected it into the stumps to run out Morgan for 38 off 23 balls.
Also Read
It is the last match of a tour during which England won a four-match Test series 2-1 and South Africa won a five-match one-day international series 3-2.
- Brains trust -
================
"You've got to use the knowledge of the people you're lucky enough to have come in and work with you," said Stokes.
So keen are England to play 'positive' cricket that several batsmen gave their wickets away at Lord's.
Stokes hinted at a more refined approach by saying: "Old Trafford is known to spin, and obviously that's going to favour (Shah).
"So we might have to change where you have to think 'I can do this but no, I can't do that', if it's spinning and bouncing.
"It will just be working out a gameplan in terms of how to score, but not giving your wicket away."
Having come through all the hype surrounding Mohammad Amir's return to Test cricket for the first time since his 2010 spot-fixing crime at Lord's, they gave fans at the 'home of cricket' much else to talk about last week.
Misbah-ul-Haq marked his first Test at Lord's with a fine hundred which saw the 42-year-old perform a series of press-ups in celebration.
But in pure cricket terms it was Shah who stole the show, and Pakistan fielding coach Steve Rixon was not surprised by England's struggles.
"I think most countries around the world play 'wristies' (wrist-spinners) quite poorly," he said.
"To see someone master it and play them well is a treat to see, but I haven't seen a lot that do it yet," the former Australia wicket-keeper added.