The crime rate is really quite low in Shanghai; even the taxi drivers don't try to rip you off. One of the most unsavoury parts of town lies around the main train station, where many migrant workers end up scraping a living until they get better jobs.
If you do get something stolen you need to report the crime at the district Public Security Bureau (PSB) office and get a police report. If you have something stolen on the metro, the Renmin Square metro station has its own PSB office.
Traffic is a major danger in Shanghai; it is essential to look in five different directions at once (including above you, in case of falling construction debris) whenever you cross the street. Don't ever expect any vehicle to stop for you. Shanghai's most annoying traffic problem is the swarm of mopeds and bikes that weave up and down the pavements dodging pedestrians (because certain sections of Shanghai's roads are off-limits to bikes).