Hamid Hassan then put in an outstanding performance, taking 6-40, with four of his victories caught by keeper Mohammad Shahzad to crush the hosts, for whom Dewald Nel was top scorer at the tail with 36.
And, although they opted not to enforce the follow-on due small injuries to Hamid and Shahpoor, Afghanistan were left with two days to push for victory.
Shenwari began the day unbeaten on 50, and carried on his form from the first evening, stroking three boundaries in the first three overs of the day. Asghar Stanikzai 88 not out at the other end added just five to his score before falling four overs into the day to end a partnership of 119.
Mirwais Ashraf offered good support to Shenwari, making 19 and hanging around for 51 deliveries to see him within sight of his maiden first-class century - which he duly reached before becoming the last man out when bowled by Nel.
Scotland were soon in trouble as medium-pacer Hassan snared Fraser Watts (16), whose opening partner Ryan Flannigan was run out by Ashraf for the same score.
Hassan ran through the middle order with a spell of four wickets in as many overs, leaving wicketkeeper Simon Smith to offer some overdue resistance with a gritty 19 not out from 90 balls.
Smith played second fiddle, though, as Nel top-scored from number 11.
The South Africa-born paceman made a first-class best 36, with five fours and a six, in a last-wicket stand of 63 to salvage a degree of respectability.
Afghanistan secured the very much 6 needed points from the first innings, which puts them on a 3rd place in the table with 63 points same as Zimbabwe. Scotland is still on top with 66 points.
Izatullah trashes Scotland
Afghanistan No Longer a Rookie
Afghanistan vs West Indies Preview
UMESH - AFGHANISTAN IS READY FOR INTERNATIONAL CRICKET
Afghanistan under-19 Looking to Impress at the 2012 ICC under-19 Cricket World Cup
Find News by Tag
ACB Afghanistan Asghar Stanikzai Asian Games AYCA Balkh Cricket Development Domestic Dr. MA Shah Lephone Night Trophy Gulbadin Naib Hamid Hassan ICC India Intercontinental Cup Kabir Khan Kabul Khaliqdad Noori Mirwais Ashraf Mohammad Nabi Mohammad Shahzad Nowroz Mangal Pakistan Rashid Latif SAARC Samiullah Shinwari T20 WCL Division One World Cup