The selectors also retained former captain and wicketkeeper, Sarfaraz Ahmed in the squad as a standby to vice-captain, Mohammad Rizwan.
West Indies were 49-1 at the close in a test that has already lost a full day to bad weather yet still looks likely to produce a result.
Leg-spinner Shah's selection was subject to the 35-year-old clearing a fitness test, chief selector Mohammad Wasim said in a statement.
Fortunes ebbed and flowed dramatically throughout the fourth day with 14 wickets falling before Roach stroked the winning runs through the covers.
At stumps, Pakistan's score read 145/3 with Fawad and Babar unbeaten on 42 and 77 runs respectively. For South Africa, Keshav Maharaj picked two, Anrich Nortje took one while Kagiso Rabada went wicketless.
Pakistan spinners Yasir Shah and Nauman Ali took five wickets between them to restrict South Africa to 220 all out, but the home side faltered in reply to close on 33 for four on day one of a fast-moving first Test in Karachi on Tuesday.
The selectors have also put Bilal Asif, Imran Butt, Musa Khan and Mohammad Nawaz on standby to cover for any player who fails pre-tour COVID-19 Testing scheduled later this month.
Pakistan had been reduced to 76 for five in their second innings as South Africa's spinners made inroads through the top order having been bowled out for 201 in another shambolic display with the bat.
Hasan took career-best figures of 10-114 in the match as South Africa lost their last seven wickets for the addition of only 33 runs.
The infected players will go into self-isolation.
Olympic champions Germany clinched the Hero Champions Trophy title with a convincing 2-0 win over Pakistan in the summit clash, snapping their five-year old jinx in the elite eight-nation event at the packed Kalinga Stadium in Bhubaneswar.
Four-time champions Pakistan produced a lion-hearted performance before going down 0-1 to Olympic bronze medallist Germany in their opening Pool D match of the 2018 Hockey World Cup.
India maintained their recent domination over arch-rivals Pakistan with a fighting 2-1 win to bag a consolation bronze medal at the 18th Asian Games.
India blanked arch-rivals Pakistan 4-0 to open its campaign on a rousing note in the final edition of the Champions Trophy hockey tournament.
Uncapped left-arm spinner Zafar Gohar has joined the test squad from the Pakistan A team currently in Hamilton.
Penalty corner specialist Rupinder Pal Singh slammed six goals as India launched their campaign in the fourth Asian Champions Trophy with a rousing 10-2 victory over Japan in the Kuantan Hockey Stadium, in Malaysia, on Thursday.
India defeated arch-rivals Pakistan 3-2 in an intense match of the Asian Champions Trophy on Sunday.
India wasted chances galore in their 1-2 defeat against arch-rivals and defending champions Pakistan in a keenly-contested Pool B match of the men's hockey competition at the 17th Asian Games in Incheon on Thursday.
Germany outclassed last edition silver medallist Netherlands
In a nerve-wracking contest, India beat Pakistan in penalty-shootout to clinch the coveted hockey gold at the Asian Games in Incheon on Thursday. This triumph ensures the Indian hockey team a berth at the 2016 Rio Olympics.
World Cup bronze medallists Argentina stunned Olympic champions Germany 3-0 in their concluding Pool B match to end their league engagements in the Hero Champions Trophy hockey tournament, in Bhubaneswar, on a high note.
Pakistan avenged their Asian Games final loss when they beat India 4-3 in Bhubaneswar on Saturday to enter the Champions Trophy hockey final.