Kagiso Rabada bagged four wickets and Marco Jansen picked three to put the home side in control of the match.
Virat Kohli will come back for the final Test against South Africa in Cape Town after missing the Johannesburg Test due to back spasms.
The India vs South Africa Test in Cape Town will be the decider for both teams, with the Proteas having a great record.
Rahul, in the absence of Virat Kohli, who was unable to play due to a spasm in his upper back, led India in the second Test.
South African skipper Dean Elgar led the charge with an unbeaten 96 and he was extremely well supported by the rest of the batting order.
The start of the fourth day of the India vs South Africa Test has been delayed due to rain
Former India player has made his predictions for the fourth day where the hosts need 122 runs more to win the match.
Shardul finished with incredible figures of 7-61 in 17.5 overs, dismissing the likes of Dean Elgar, Keegan Petersen, and Temba Bavuma.
KL Rahul played a decent knock as he scored 50 runs and all-rounder Ravichandran Ashwin contributed with a gritty 46.
Virat Kohli has been ruled out of the Johannesburg Test due to a back spasm.