The case was heard at Newport Crown Court
A voyeur rigged up a mirror device to see around corners so he could see his next door neighbour as she dressed.
The man, who cannot be named to protect his neighbour's identity, watched her change up to three times a day at her Pontypridd home.
Newport Crown Court was told the man saw her naked twice and in a state of undress 30 times.
He admitted six voyeurism charges and was given a three-year community order to attend a Sexual Offenders Group.
He will also have to register a sex offender for five years.
The court was told how the man glued a mirror onto the end of a piece of wood then angled it through the window.
It was discovered when the woman spotted the mirror dangling outside her window, she then rang the police.
Prosecutor Ian Kolvin said: "The woman was in her bedroom with her partner when she looked out of the window and saw for the first time a mirror attached to a piece of wood."
Mr Kolvin said: "He told police he found her attractive and was pleased if he saw her naked.
"He said he saw her totally nude twice and saw her in her underwear at least 30 times.
"But he maintains there was no sexual gratification."
The court was shown the home-made spying device which the "peeping Tom" used for four months at his home.
Daniel Williams, defending, said: "He is bitterly disappointed at the loss of trust and friendship.
"He appears to be a socially-isolated individual and is described as a bit of a loner."
"These are offences that appear to be borne out of curiosity and mischief after staring out of his window for hours on end. His mind wanders."
Judge William Gaskell told him: "You used a mirror to look into the private rooms of a female neighbour to watch her while she was undressing and naked.
"This was a breach of trust against your neighbour," he added.