Farmer Geoffrey Wilde, 48, a married father-of-five, took the undergarments over a two-year period.
He was given a six-month nighttime curfew by the court.
When he was finally arrested police discovered he was wearing a pair of blue knickers when they asked him to change his clothes.
Wilde, who was held after being spotted in a passageway acting suspiciously in Welshpool, Powys, admitted that he needed help when interviewed by officers.
A homeowner called police after the well-respected father was seen carrying a torch and three pairs of women’s underwear.
Magistrates were told that the haul of knickers and bras – some of which belonged to elderly women – were found during a search of his home.
Helen Tench, prosecuting, told Welshpool magistrates: ‘In interview he said “I need help. I shouldn’t be doing what I’m doing. I don’t know why I’m doing it’.”
Wilde admitted 18 counts of theft at an earlier hearing.
Paul Inns, defending, said that Wilde made a full admission and had even helped police in matters that were above and beyond what they were investigating.
‘He is remorseful and ashamed of his behaviour, not only for himself, but for the impact of his behaviour on his family,’ said Mr Inns.
‘He is well thought of in his community and the loss of his good character may be viewed as punishment by some.
‘This is a gentleman who has suffered a significant fall from grace.’
Mr Inns said that there was an underlying psychological disorder surrounding Wilde’s behaviour.
Chairman of the bench David Peate told Wilde: ‘We are aware, and I’m sure you are too, of the seriousness of these offences. We are anxious to ensure that this behaviour ceases. It’s important to protect the public.
‘What we are doing is giving you the maximum which is available to us, and the best for you too. This is an opportunity to try to put a stop to all of this because if you don’t, I don’t need to say what will happen.’
Wilde was given a three-year community order with three requirements.
He will have 36 months of supervision with a male support officer and will attend a community sex offender programme.
He was placed under a curfew for six months and must stay at home between 6pm and 6am.