Manchester United enjoyed a comfortable 4-0 victory against Dunfermline in Pars' captain Scott Thomson's testimonial at East End Park.
Rooney scored one of his two goals from the penalty spot
Strikes by Chris Eagles, Ryan Giggs and a Wayne Rooney double, one from the spot, sealed the win for United.
Thomson, 35, said the visit of the English Premier League club made his testimonial an unforgettable occasion.
"I got Giggs' jersey after the game and it was great they all applauded me at the end," said Thomson.
Paul Scholes played himself in to contention for Sunday's league opener against Reading at Old Trafford by playing against the Pars.