Days of violence and looting of foreign-owned shops in South Africa have left at least two people dead and 153 arrested in the Johannesburg area, police have said.

The targeting of Soweto area shops owned by immigrants from Ethiopia, Somalia and other countries recalled a wave of deadly violence against foreigners in South Africa in 2008.

But police sought to downplay allegations that xenophobia was the cause of this week's unrest, instead saying groups of young people, some in school uniform, were indiscriminately looting wherever they could.

"The youth who are addicted to drugs ... are taking advantage of this situation," provincial police commissioner Lesetja Mothiba said in a statement.

"They are targeting specific items from the shops," including cash and cigarettes.

The violence started on Monday when a foreign shopowner shot a 14-year-old boy in Soweto who was allegedly trying to rob his shop, according to the South African Press Association.

Another man, believed to be a foreign national, was killed during the days of looting.

Police stood guard as Ethiopian, Somali, Pakistani and Bangladeshi nationals packed up the stock from their shops, and loaded it onto trucks that were escorted by police out of Soweto.

Police reinforcements were sent to the township, though some video footage showed police standing by as looters emerged from pillaged buildings.

In one instance, a police officer was accused of participating in the looting. The officer, who was filmed, will be charged, according to the provincial head of community safety, Sizakele Nkosi-Malobane.

President Jacob Zuma, who was attending the World Economic Forum in Davos, Switzerland, instructed security officials to ensure that order is restored, Mr Zuma's office said.

In 2008, South African mobs attacked immigrant-owned shops, triggering a wave of violence that killed 62 people.

South Africa has a high unemployment rate and deep-rooted economic inequality, factors that fuelled resentment toward foreigners perceived as taking opportunities away from South Africans.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.