But it was Finch and Khawaja in the afternoon session who batted with resolve. Had the umpire given him out, the call would have stood.
At stumps opener Usman Khawaja was batting on a fighting 50 and Travis Head on 34 as the pair had added an invaluable 49 for the unbroken fourth wicket stand to prolong Australia's resistance on a tired and spinning Dubai stadium pitch.
Shafiq hit nine boundaries and a six in his 278 minutes at the crease.
Peter Siddle took three wickets for Australia and Nathan Lyon grabbed two wickets.
A year ago he was included in Pakistan's squad for the two-match series against Sri Lanka, but did not feature as team management thought he was still not ready. "I always want to play positive and leave behind all such things", Hafeez said.
In the process, Khawaja, who top-scored for Australia in the first innings with a knock of 85, touched the 50-run mark for the second time in this Test.
Pakistan will resume on day four at 3-45, leading Australia by 325 runs after offspinner Bilal Asif wreaked havoc on the tourists with six wickets on debut.
Part-time leg-spinner Marnus Labuschagne finally broke through just before the tea break when he lured Shafiq to drive the ball away from his body and got the thick outside edge to Paine behind the wickets.
Apple Watch Nike+ Series 4: Know More
However, out of 24 hours, the particular watch face is reportedly not registering an hour or so worth of activities. DST changeover is the 4th November, so Apple has a few days before this issue affects its biggest markets.
With a separate review into the culture of the men's team also set to land, Australia will be under plenty of scrutiny during the two-test series which finishes in Abu Dhabi.
Pixel 3 and 3 XL launch: any surprises are on the inside
It features an Ambient EQ mode, which dims the screensaver depending on the time of day so that it's never blaring in your face. Of course, we'll be fully testing the Pixel 3 for stamina closer to launch and we'll bring you the full results.
Bale, De Bruyne among first Ballon d'Or nominees
The victor of the award - which is decided by journalists from 173 different nations - will be announced in Paris on December 3. Premier League duo Roberto Firmino and Eden Hazard are among the nominees for the 2018 Ballon d'Or .
Japan overtakes Singapore as world's most powerful passport
The index, by Henley & Partners, a citizenship and planning firm, showed Japan to have the most powerful passport on the planet. The countries both climbed to 1st place in February, pushing Germany down to 2nd place for the first time since 2014.
Tropical Storm Michael forms in the Caribbean
The Gulf of Mexico is home to 17 percent of U.S. crude oil and 5 percent of natural gas output daily, according to the U.S. Hurricane force winds extend 45 miles outside the center, and tropical storm force winds extend outwards 175 miles.
Ballon D'Or 2018: Pogba reveals his three choices
Cristiano Ronaldo headlines the latest batch of players to be announced as nominees for the 2018 Ballon d'Or by France football . De Bruyne was nominated for helping his club win the Premier League and his country reach the World Cup semi-finals.