Sheriff Lindsay Foulis berated William Frame, 55, for the stunt – which left his family thinking he had shot himself just yards from where they were hiding.
But he praised Frame’s wife Wendy for the coolness she showed in locking herself and the children in a safe place while he went on the rampage.
Frame said he was going to shoot himself then took the shotgun into a bedroom at his sprawling country home.
His family heard the blast – but were unaware Frame had only shot at a tree out of the window.
“You decided to act in an extremely melodramatic way,” Sheriff Foulis told Frame. “It was very much attention-seeking. The serious matter is that while you had no intention of ending your life, the people close to you did not know that.
“Your wife, rightly, was terrified by what might happen next. She is to be commended for taking the steps she did in gathering the children and locking them in a bathroom to protect them from what you might do.
“She was clearly in a state of extreme anxiety. She deserves commendation for her clear approach. All you were intent on doing was creating further melodrama, but your wife doesn’t know what you’ve done, and doesn’t know what’s happening next.
“If she leaves the bathroom she doesn’t know what she and the children might find.
“One can only imagine the high level of anxiety they would all have suffered.”
Frame was ordered to carry out 275 hours of unpaid work.
The property developer blamed the pressure of the banking crisis.
Frame’s wife and children only realised he had not killed himself when he knocked on the door and told them he was alive.
However, they were so frightened that they stayed locked in the bathroom until police arrived at their Perthshire estate.
Sheriff Foulis added: “He makes the extreme threat of ‘Going to end it all’. There might be other businessmen with the same view as Mr Frame as to how banking institutions have dealt with him over the last few years.
“It strikes me that this is quite an unusual set of circumstances.”
Frame, of Gamefield, Ochtertyre – the founder of property company Braemore Estates – admitted conducting himself in a disorderly manner on 16 June last year.
He admitted shouting and swearing and threatening to kill himself at the family home near Crieff, Perthshire. He also admitted firing the shotgun through an open window into the garden, which caused fear and alarm to other people in the house.
A Crown motion to confiscate the shotgun was refused after the court heard it was worth £6,000. Frame said it would be sold to help tackle his debts.
The businessman has owned a number of property interests and has been involved as a company director with different businesses, including Paparazzi Restaurants. According to a web profile, Frame launched his property career in 1987 by buying a small flat in Marchmont, Edinburgh, doing it up and selling it at a profit six months later.
The profile added: “Since those early days a wide portfolio of residential and commercial properties in Scotland and London’s Knightsbridge, South Kensington and Chiswick, has been built up allowing the business to diversify into residential development.”