I don't claim to have watched the tests where Shakib got those 5fers in SA, but a cursory glance at the scorecard shows that:
- in one of the tests, Shakib took 6/99. This included a spell where he took the wickets of Kallis, Amla and de Villiers in the space of 4 overs to reduce SA to 134/5. At this point, SA still trailed Bangladesh's first innings by 120. This is the complete opposite of a useless spell.
2nd Test: South Africa v Bangladesh at Centurion, Nov 26-28, 2008 | Cricket | ESPN Cricinfo
- The other one had him take 5-130 in the first innings. SA were 352-3 and eventually ended up 441 allout, with Shakib basically single handedly responsible for SA losing 7 wickets for 85.
1st Test: South Africa v Bangladesh at Bloemfontein, Nov 19-22, 2008 | Cricket | ESPN Cricinfo
That Bangladesh are a **** team and could only get like 150 in their innings that followed doesn't render his spell useless from a performance standpoint. It wasn't a spell in the second innings where the opposition are going for declaration runs. It's in the first innings when the match is still alive. If he'd got all his wickets after SA were 500+, I'd agree but here he clearly kept the game alive when SA could easily have stomped their way to 600.
Again, I didn't watch the matches and I don't have any idea how well Shakib actually bowled but even a brief look at the scorecard makes it clear his two 5fers weren't anywhere close to being written off as "useless". You wanted context, there it is.