Aaron Mclean got Posh back into the match with a header before the interval but Jason Shackell nodded in late on to ensure the visitors stayed in the bottom three and were without a win in five matches.
Doncaster recalled James O'Connor for Gareth Roberts in defence and John Oster was named on the bench after serving his three-match ban, but there was no place for Quinton Fortune.
Tom Williams failed to recover from an ankle injury for Peterborough, with boss Darren Ferguson picking Jamie Day in the starting line-up, while George Boyd's selection saw him set a new club record with his 125th consecutive appearance.
The visitors looked the more threatening in the opening stages and striker Craig Mackail-Smith struck a shot from the edge of the area which almost squirmed by Neil Sullivan, but he managed to hold on.
Rovers began to apply pressure with James Coppinger sending in three crosses in quick succession before Sharp pounced in the six-yard box after Shiels' drive had been parried by Lewis to put the hosts ahead in the 17th minute.
Rovers looked a different side following the goal and soon added to their lead when they broke at pace after the visitors had wasted a free-kick and Shiels combined with Coppinger before rifling in from the edge of the area.
Coppinger was providing a constant menace down the right but his snap-shot was blocked as it went out for a corner just after the half hour.
Posh finally responded with a goal against the run of play as Tommy Rowe's left-wing cross was headed in by Mclean.
The visitors had a strong penalty appeal waved away just before the break when James O'Connor appeared to block Mclean's shot with his arm.
Peterborough made changes immediately after the interval with Dean Keates and Lee Frecklington coming on and they upped their tempo as Mclean had a chance to level but his shot bounced into the ground and harmlessly into Sullivan's arms.
Doncaster regained their control and almost restored their two-goal advantage as Coppinger brought out a fingertip save from Lewis and Shiels curled just over the bar in the 71st minute.
Shackell powerfully headed in from a corner in the 85th minute to confirm the win.