Pakistan were 268 for six when bad light and then rain brought the second day at Malahide to a premature close.
Shadab, in just his second Test, was 52 not out and left-hander Faheem 61 not out, with their unbroken seventh-wicket stand so far worth 109 runs after they had come together at 159 for six.
Pakistan, sent into bat by Ireland captain William Porterfield, lost two wickets in successive balls to be 13 for two, but concerns that Ireland would pay for doing without a specialist spinner were eventually proved to be well-founded.
Middlesex paceman Tim Murtagh led Ireland's attack with two wickets for 33 runs from 17 overs, with Boyd Rankin taking two for 58 in 17 overs.
There was drama at an initially sun-drenched Malahide right from Saturday's first ball of this stand-alone match.
Azhar Ali dug out a Murtagh delivery and called for a quick legside single.
Non-striker Imam-ul-Haq, like Faheem making his Test debut, found himself sandwiched between wicket-keeper Niall O'Brien and Kane in a heavy collision as he scrambled to complete the run.
The 22-year-old was left flat on the ground and needed several minutes' treatment on the field, but he recovered to face the second ball of the match, with Imam playing and missing.
Imam, the nephew of Pakistan selection chief and former Test batsman Inzamam-ul-Haq, scored a hundred on his one-day international debut against Sri Lanka last year.
The left-hander, who came into this match following fifties in Pakistan's two warm-up fixtures, against Kent and Northamptonshire, square-drove Murtagh for a stylish four.
But it did not take long for Ireland to make a stunning double strike on a pitch offering some sideways movement.
Rankin, the 15th man ever, and the first since Kepler Wessels (Australia and South Africa) 25 years ago, to play Test cricket for two nations after making a lone appearance for England in 2014, had an uncertain Azhar (four) edging to Porterfield at second slip.
That left Pakistan 13 for one off the last ball of the eighth over.
Barely had the crowd's cheers subsided, then Pakistan were 13 for two off the very next ball, with Imam lbw for seven to a Murtagh delivery that came back into him.
After a few near run-outs, Pakistan's third-wicket duo settled in.
Shafiq square-cut Kane for four, with left-hander Haris Sohail glancing Stuart Thompson for a legside boundary.
Pakistan, 67 for two at lunch, lost their third wicket soon afterwards when Haris was caught in the gully by Porterfield off Thompson.
Babar Azam (14), pushing hard at a Murtagh delivery that left him off the pitch, was well-held by Paul Stirling at second slip.
Shafiq went on to complete a 107-ball fifty when he pulled Rankin for a single.
But with the towering Rankin, bowling from around the wicket, a similar shot proved Shafiq's undoing when he found Andrew Balbirnie at square leg.
And when Pakistan captain Sarfraz Ahmed (20) was caught by Stirling in the slips off Thompson, the tourists were 159 for six.
But Shadab and Faheem turned the tide in style.
Faheem, however, did have a break when, on 36, he edged Rankin only for a diving Niall O'Brien to miss the catch and give the obscured Gary Wilson at first slip no chance of taking the ball.
Duly reprieved, he went to fifty in just 52 balls, including seven fours, with Shadab following him to the landmark in 89 balls.
When Stirling did come on, a well-set Faheem launched the part-time spinner over long-on for six.
Bad light saw the players leave the field at 5:27pm local time (1627 GMT) and 20 minutes later, after a thunderclap and a heavy downpour, play was abandoned for the day.
First Published: May 13, 2018, 7:50 AM IST