Two students have handed over 5,000 euro each for hacking Fine Gael's website weeks before the 2011 general election.
A judge ordered computer experts Darren Martyn and Donncha O Cearrbhail to donate half the money to charity and half to the coalition Government party.
The pair were brought before Dublin District Court for sentencing after admitting the criminal damage as a stunt to embarrass the political party.
The court heard Fine Gael had chosen suicide prevention charity Pieta House for 5,000 euro, with the other 5,000 euro going to the party.
Judge Ann Ryan applied the probation act, meaning the hackers escaped a prison sentence and will not have a criminal record.
"I hope both have learnt a lesson," she said.
"Such expertise should be used in the right way and I hope you do that in the future because you have a lot to give society.
"I think that's what you should be doing."
Martyn, 21, of Cloonbeggin, Claregalway, Co Galway, studies forensic science and analysis at Galway-Mayo Institute of Technology (GMIT) and 20-year-old O Cearrbhail from The Ring, Birr, Co Offaly, is a student of medicinal chemistry at Trinity College Dublin.
The pair, who used the online aliases Raepsauce and Palladium, had been identified by the Garda Bureau of Fraud Investigation in conjunction with US law enforcement agency the FBI, the court previously heard.
They had pleaded guilty to criminal damage to the www.finegael2011.ie website.
The site was defaced, had its database stolen and was knocked offline for 24 hours after it was hacked on January 9, 2011 - seven weeks before the general election.
According to Fine Gael it cost 10,000 euro to get it up and running again.
The co-accused, who were accompanied to the hearing by family members, stood side by side during the brief hearing.
The court heard they have no previous convictions and the judge said the Probation Service's restorative justice report had been "very good".
They could have faced a fine and a maximum 12-month jail term.