Pakistan had the advantage in the first session with leg-spinner Shah taking two wickets, dismissing left-hander Lahiru Thirimanne for his 150th Test wicket.
Sri Lanka were 61-3 off 28.1 overs at lunch.
Karunaratne added an invaluable 100-run partnership with skipper Dinesh Chandimal, who was 60 not out at stumps, as Pakistan failed to break through with the second new ball.
Shah returned figures of 2-59 but didn't get much turn from the pitch while seamer Hasan Ali took 1-58.
The Test match is Pakistan´s first since the retirement in May of Younis Khan and Misbah-ul-Haq.
Except for India due to political reasons, Bangladesh and Zimbabwe, nearly all high-profile teams have had their turn facing Pakistan in Tests and in limited over games here in Abu Dhabi, Dubai and Sharjah with Pakistan more or less being dominant against them.
Prince Harry and Meghan Markle get affectionate at Invictus Games
For almost a year, he saw a beautiful love story with the heroine of the series Suits: the lawyers on measurement. Filmed, hand in hand, on their arrival, they are not left in the match.
With two wickets during the opening session, Shah broke Waqar Younis' record to achieve the feat, slowing down Sri Lanka after Dinesh Chandimal won the toss and opted to bat first.
However, when he was just seven runs away from his century, disaster struck as Karunaratne was run out by Mohammad Abbas.
Meanwhile, Sri Lankan captain Chandimal stated that he expects that team will play well in the match.
"Azhar Ali will play at one-down position while vice-Captain Asad Shafique would come at number four down the line", Sarfraz revealed.
The English language channel is not available on UK TV and only broadcasts to India, Nepal, Sri Lanka, Pakistan, Afghanistan, Maldives, Bhutan and Bangladesh.
Chandimal was given leg before to Yasir Shah on 42.