Josh Wheelhouse fell ill at Eirias High School in Colwyn Bay, Conwy county, and staff saved him by giving mouth-to-mouth resuscitation and heart massage.
He has since been told he may have Long QT Syndrome, a disorder of the electrical system of the heart.
Eirias High has since bought a defibrillator, which shocks the heart.
His mother Tracy wants other schools to follow suit.
"Up until the day he collapsed we weren't aware he had a problem, he's never had chest pains," she said.
"I think they should all have defibrillators in school because this has happened out of the blue."
Josh added: "It happened suddenly to me so it can happen to anyone."
He was taken to Glan Clwyd Hospital after collapsing at school a month ago and then to Alder Hey children's hospital in Liverpool.
He was fitted with an internal defibrillator which will reset his heart rhythm if it becomes unstable.
Phil McTague, head teacher of Eirias High, said first aid-trained staff "were able to spot all the very serious signs and realise this was something which needed urgent attention".
"They administered mouth-to-mouth and CPR for approximately six minutes until the ambulance service arrived and obviously they applied a defibrillator to try to get a rhythm back into Josh's heart and he was then whisked away," he said.
"It was all very, very worrying and really the staff, the students, they were all brilliant."
The mother of a 15-year-old boy who collapsed at school with a previously undiagnosed heart defect is calling for all schools to have defibrillators.