Leanne Zaloumis, who was found in a walk-in wardrobe at the X Factor judge's mansion, was told by Judge Robert Winstanley at Isleworth Crown Court, west London, that the order would have a mental health requirement.
The 30-year-old was also handed a 12-month supervision order and a restraining order against Cowell until further notice.
Zaloumis, of Brownhill Road, Catford, south-east London, had admitted being in possession of a brick with the intent to damage or destroy property, and breaking a window at the Holland Park address, at a previous hearing.
Cowell, 52, was watching TV in his bedroom when he heard a ''loud bang'' coming from his bathroom on March 24 and called his staff.
Zaloumis was taken to Notting Hill police station after being found inside the property.
At a previous hearing, she was told she must stay at her home address, remain inside between 7pm and 7am and wear an electronic tag.
She was also told by Judge John Denniss on that occasion that the 102 days she spent in custody was ''sufficient punishment''.
Cowell was not present at the hearing.