Emma West, 36, of New Addington, admitted racially-aggravated disorderly behaviour likely to cause harassment or distress at Croydon Crown Court.
West was filmed shouting racist abuse at passengers travelling on a tram between Croydon and Wimbledon.
She was bound over to keep the peace and handed a 24-month community order.
A judge said West was clearly suffering from mental health problems at the time of the outburst.
She received a mental health treatment order for assaulting a constable in a separate incident.
The court heard she was "reeking of alcohol" when she carried out the verbal attack.
Prosecutor Julius Capon said: "She in essence persecuted a number of passengers on the tram, subjecting them to some disgusting racial abuse."
The things she said included "you're not English", "none of you are English" and "get back to your own countries".
Mr Capon said many of the passengers were "upset" by West's behaviour.
"Some of them described themselves as being disgusted, shocked and horrified," he said.
David Martin-Sperry, defending West, said the defendant's offending was out of character, she was taking anti-depressants and she does not harbour any racist views.
Mr Martin-Sperry said she had unwittingly taken two and a half times the recommended dose and drunk a large glass of wine before launching the tirade.

The Dons were held to a 1-1 draw at Pittodrie on Thursday, with the second leg in Bosnia-Herzegovina on 20 July.
Apollon hold a commanding 3-0 lead after their home first leg.
Coached by former Cyprus goalkeeper Sofronis Avgousti, Apollon finished third in their national league last season.
Their squad, which features several Cyprus internationals, includes former Sunderland centre half Valentin Roberge, while former Porto goalkeeper Bruno Vale captained the side against Zaria.
Malta striker Andre Schembri, their summer signing from Boavista, opened the scoring, with Brazilian midfielder Alex da Silva adding to that from the penalty spot before Portuguese Joao Pedro made it three before the break.
Defender Angelis Charalambous, who had a short spell with Motherwell, and 20-year-old Edinburgh-born midfielder Alastair Reynolds are also on the Apollon books but did not feature in their Europa League line-up.
Apollon went into the third qualifying round last season but lost 5-4 on aggregate after extra-time against Grasshopper Zurich.
Zaria, who finishing fourth in Divizia Nationala last season, qualified because title winners Sheriff Tiraspol completed a league and cup double.
Having themselves won the cup the previous season for the first time, Zaria were knocked out in the first qualifying round of the Europa League after also losing the first leg 3-0 to Videoton of Hungary before winning the home game 2-0.
Aberdeen were in the same section of the draw at Everton, but the English side were paired with either Slovakia's Ruzomberok or Brann of Norway.
Full Europa League third qualifying round draw
A woman who was filmed shouting racist abuse on a London tram in a video watched by 11 million people has been given a community sentence.
[NEXT_CONCEPT]
Apollon Limassol of Cyprus or Moldova's Zaria Balti await Aberdeen in the Europa League's third qualifying round - if they get past Siroki Brijeg.