To the history of Shanghai:
Around 1685 during the Qing dynasty in Shanghai a port was established for international trade and customs.
1843 after the Opium war, the first imperialist forces (mainly Britain) “opened” Shanghai for themselves and Shanghai/China had to begin to suffer from colonialism 殖民主义. 1845 British started setting up residences and trading posts up there, beginning of the British Concession 英租界.
1849 French imperialists also came and started up setting up the French Concession.
1863 the concession areas formed / split up from the British-American 英美 into the public / international concession the Chinese Concession and the french concession.
(Source 百度知道上海历史 Baidu Zhidao Shanghai Lishi – my translation and comments)
DETAILED HISTORY about Shanghai:
“In 1843, under the agreement of Nanjing Treaty, Shanghai became one of the five treaty ports. Shanghai was turned into a colonial city and was consistently under control of a compound of foreign countries, leading among them were Great Britain, France, America and Japan.”
For general Chinese history:
（the China History Podcast)
Short history of Shanghai:
Tianzifang is a nice old quarter in downtown Shanghai, now it contains a lot of shops where one can buy all kind of souvenirs.