Wales' record try scorer, who touched down twice in the Lions' third Test win over the Springboks this summer, had a routine procedure on his shoulder last week.
But Ospreys physio, Chris Towers, claims the timing of the operation was set to ensure Williams will be fit to return better than ever for the new season. Williams will return to training on 10 August, along with the Ospreys' other Lions.
"Shane underwent surgery to his shoulder on Tuesday, 14 July. It was a routine procedure that had been pre-planned to coincide with his return from the Lions tour," said Towers. "By the time Shane reports for pre-season training in August, he will already be four weeks post op and, apart from initially not being able to take contact and lift heavy upper body weights, there will be little impact on his pre-season preparations.
"A further four to six weeks should see him back to full training and available for selection, along with his Lions team-mates as per schedule."
Guinness PRO12
Suite 208, Alexandra House,
The Sweepstakes
Ballsbridge, Dublin 4, Ireland