Myra Carvalho, 35, from Brazil, sent the 30-year-old singer handwritten letters while in the UK as well as ordering a series of cards for him online which were sent to his address, Harrow Crown Court was told.
Carvalho had been staying at a backpacker hostel in Earls Court, west London, court documents show, having been in the UK since December.
Of the 8,000 cards sent, some were wedding cards, prosecutors allege.
Two of the letters were hand-delivered to Styles’ address, the court was told.
Her family did not know she had travelled to the country, the court heard.
Appearing via video link from HMP Bronzefield wearing a black coat and gloves, she spoke only to confirm her name during the short hearing and did not indicate a plea.
Judge Karim Ezzat sent her case to be heard at the same court on April 19.
She was remanded in custody. Styles was on Sunday spotted in the crowd for Luton Town’s match against Manchester United.
The former One Direction star – a United fan – also dropped in to the Sky Sports studio ahead of the match.