Graeme Smith (24) was one of the two wickets to fall in his 100th Test as captain - 99 for his country and one for a World XI side - as Pakistan's bowlers made life difficult for the world number one side.
Alviro Petersen (20) was also back in the pavilion before Hashim Amla and Jacques Kallis saw the Proteas through to lunch.
There seemed to be plenty of life in the Wanderers pitch for the bowlers and Pakistan were initially frustrated as the ball flew past the outside edge on several occasions.
South Africa appeared to have weathered the early storm as Petersen and Smith approached a half-century opening stand, but Petersen then got a leading edge which looped up to third slip off the impressive Junaid Khan with the total on 46.
And it was soon 46 for two as Smith, who had won the toss and opted to bat, edged behind off Umar Gul, giving wicketkeeper Sarfraz Ahmed a simple catch.
Pakistan were on top but Kallis refused to bow to the pressure and struck three boundaries as he reached 15 not out from 22 balls at lunch, while Amla was unbeaten on seven from 16 deliveries.