Shakib hit twice in the first over on Day 3 at Zahur Ahmed Chowdhury Stadium in Chattogram on Saturday.
Bangladesh have been cleaned up for 205, handing a 137-run lead for the visitors. Bangladesh team ended their second day on 194-8 and is now trailing by 148 runs. Afghanistan was dismissed for 342 in first innings, their highest total in Test cricket.
Skipper Rashid Khan led the side from the front, claiming 4-47 to help Afghanistan tightening the noose. Mohammad Nabi also took 2-53 as the hosts ended the second day on 194-8.