Catherine Allan, prosecuting, said the teenage boy was making his way to bed when he heard his younger sister call out.
He went into her room and saw the girl standing near the window.
"He also thought it was his older sister, who wasn't meant to be in the house at the time, and tapped her on the shoulder," said Miss Allan.
"He had to do this a number of times before she turned round and he realised it was the defendant who lives across the road."
Miss Allan said that when the boy escorted the defendant downstairs he realised the front door was locked and asked how she had got into the house.
"She told him she had climbed in through the bathroom window and he later found it was open," said Miss Allan.
"He also found his iPhone was missing and contacted the police."How very strange! Not your usual burglary, is it? Why would the lad not recognise this girl wasn't his sister?
When officers went to speak to the girl she initially denied taking the phone. She said the other family were lying and Allah was watching.Oh!
She then admitted the theft and directed the officers to a cupboard where it was hidden.The world's most inept burglary?
Simon Farnsworth, defending, said the girl had been brought to the UK to live with her father who she hadn't seen for a number of years.
"She found it difficult to integrate with Western society and that resulted in self-harm and anti-social behaviour," said Mr Farnsworth.
"She has been falling out with her parents over such things as marriage."Well, this clearly has an easy solution. Deport her.