You should first and foremost keep in mind that China is a large and highly diverse country, so any impressions you might gain from a short trip will quite often be reflective of only a small part of China. This is particularly true if you are only visiting Beijing or Shanghai, and the only things you see of China are tourist sites or the view from the backseat of a taxi cab. It cannot be stresses enough that many people widely considered to be "experts" in China have experiences in China that are no deeper than this. Shanghai in particular is hardly representative of a typical Chinese city or the way typical Chinese people live. Southeast China is different from northeast China, and western China is quite different from both, and when you start talking about small ethnic villages you are entering a whole new ballgame altogether. A short trip will only give you a taste of a part of China, and only a small taste at that.
Security is a big issue in China, especially when it comes to foreigners. One of the first rules for traveling in China--a rule Chinese tourists observe--is to keep most of your money hidden, and not to flash a lot of cash around in a marketplace. It will only lead to grief. In China it is highly unlikely that you will be mugged or killed. However, it is common to find things lost or stolen if you are not careful. One street vendor near my office had a fairly robust selection of lost tourist cameras, and it seems that my daughter always had trouble losing her cell phone on the subway.
You should also be wary of strangers offering help or friendship, or offering to sell you something on the street for a bargain. Much of the time, it is just a con. Once I was sitting in a restaurant and I overheard an American tourist bragging to his acquaintances that he had managed to buy a watch from a street vendor for 50 RMB when the street vendor had wanted 200 RMB. Of course, the tourist was not aware that he could have bought the same watch for 20 RMB at a nearby shop. But what kind of watch will work for more than a few days if it costs only 20 RMB, or even 200 RMB, anyways? Some common sense should be in order here.
Food safety is a big issue not just for foreigners, but for local tourists as well. Many Chinese tourists take a supply of antibiotics with them when they travel, in case they eat something that makes them sick. It is doubtful that this option is available for most foreign tourists, so you should be careful what you eat.