Violence flared in Bolton, as well as several other towns and cities across England, following the fatal stabbing of three young girls at a Taylor Swift-themed dance class on 29 July in Southport, Merseyside.
The court was told the shopkeeper believed he had been “targeted for his race” and had been left “constantly on edge” ever since about the possibility of more protests.
Judge Margaret McCormack described the atmosphere in Bolton on 4 August as “volatile” and “very intimidating”.
She acknowledged that the 17-year-old had experienced “an appalling upbringing”, but told him: “You knew what you were doing was wrong.”
The teenager was already serving a community sentence when he got involved in the violence.
The judge warned him he would face a custodial sentence if he breached his 12-month youth rehabilitation order.
The youth was also told to pay £200 compensation to the shopkeeper.