Earlier, Yasir and Azam had kept Pakistan's slim hopes alive with disciplined first innings batting.
Opener David Warner notched the highest ever score in a day/night Test on Saturday in Adelaide putting the tourists to the sword in a almost faultless display. The umpires signalled no-ball straight away though as Mohammad Musa had overstepped and the belligerent left-hander would make them pay.
Shah is shy of the oldest cricketer to hit a maiden century - that trivial benchmark belongs to South Africa's Arthur Nourse, who was just two months short of his 43rd birthday when he scored his first Test ton, against Australia in 1921.
Pakistan was battling to stave off defeat in the day-night second Test against Australia on Monday after being forced to follow-on, with Tim Paine's men needing five wickets to clinch the series 2-0. However, Twitter sensed that it was due to Paine, Warner missed the opportunity to break Brian Lara's record of highest Test score.
Iftikhar Ahmed (10) failed to score big runs and was sent back to the pavilion by Starc.
Steve Smith, who played a knock of 36 runs, became the fastest batsman to score 7000 runs in the longest format of the game.
Warner racked up 39 fours and a singular six but he surpassed 334, the highest Test score of the legendary Bradman - one equalled by Mark Taylor against the same opposition in 1998 - in more sedate fashion, with a drive to sweeper cover for a single.
Mitchell Starc spent little time worrying about his Test future after the Ashes, despite playing a minimal role for Australia in England.
It is exalted company for a man fingered as the mastermind of the ball-tampering scandal at Newlands a year ago, which scandalised a nation and saw him banned for 12 months along with former skipper Steve Smith.
The former captain is eager to get back among the runs though revealing that he punishes himself if he isn't able to score enough.
"I still think it [the pink ball] is probably more like a white ball than a red ball, so it's probably playing in my favour there", Starc said.
"So yeah, if I get no runs I always like to have a run or go to the gym or do something just to give myself a bit of a punishment". He had commented "World Record was looking in danger" on an ICC post that said Australia declare on 589/3.
After Starc ripped through Pakistan's top order on Saturday night under lights with the pink ball, he took the key wicket of Babar Azam for 97 on Sunday afternoon.
Mitchell Starc was the hero, taking 6-66, but he put Australia's commanding position down to greater consistency within the team.