"When you come into a person's house, you do as they do," said Gosiame Choabi, of the South African Council of Churches.
He encouraged foreigners to learn and adapt to the laws of the country.
"A visitor cannot come to my house and find that we sleep at 7pm and say we will now be sleeping at 9pm," he said.
Choabi was speaking at a meeting to welcome back foreigners who fled Orange Farm after being attacked several weeks ago. Around 120 locals and foreigners attended the meeting at the multipurpose centre.
Choabi said it was important for foreigners to note that South Africans had not completely recovered from the impact of apartheid. He said a platform of communication was needed between the two sides.
ANC Orange Farm chairperson and local councillor Simon Motha said a database was needed to monitor how many foreigners were running businesses in the area. He said those who attacked foreigners should be arrested.
Members of the local business forum said they were against the attacks on foreigners. They called on local and foreign shop owners learn to work together and to share their skills and strategies.
Alfani Yoyo, of the Consortium of Refugees and Migrants, said most locals complained that foreigners were failing to integrate themselves into society.
"People are complaining that you close yourselves up in your shops and containers," he said.
"You need to come out and mingle with the people you live with, the people who support your shops," he said.
Constable Shaan Motsapi, of the local police station, said the police's mandate was to protect everyone. He said discrimination was a criminal offence.
Residents were also given an opportunity to address the meeting. One man said he had a problem with foreigners opening shops in close proximity to each other.
He said this caused problems for him when he ran his own business, especially since his prices were not as low as theirs. Another local said parents should stop accepting goods which their children had stolen from these shops.
Another community member said she had health concerns, as some foreigners bathed in the shops from which they operated. Teshela Tefera, an Ethiopian shop owner, spoke about complaints that foreigners sold their stock at lower prices than locals. He said they got their stock at the same suppliers as South Africans.
"But we sell at the same price. We are not looking for high profits," he said.
He said they were willing to work with local business owners and to share business ideas.
Bangladeshi shop owner Tazur Islam said he had fled his country because of conflict, and he urged the South African government to intervene in the attacks on foreigners. Islam was not sure he would immediately re-open his shop.
A local resident, Gladys Nhlapho, said she was glad the foreign shop owners were back in the community. She said she approved of them as they gave her some items on credit. – Sapa