If you intend to stay in Shanghai for a longer time the Shanghai Jiaotong Card (上海公共交通卡) can come in handy. You can load the card with money and use it in buses, the metro and even taxis. You can get these cards at any metro/subway station, as well as some convenience stores like Alldays and KeDi Marts. These come in regular and mini size, with various limited editions available for each. Only regular-sized cards can be loaded at machines; for the mini and other irregular sizes it is necessary to take it to a service counter for recharge.
Also, this card allows you to transfer lines at Yishan Rd, Shanghai Train Station, and Hongkou Football Stadium stations, as well as discounts for bus<->metro transfer.
The fast-growing Shanghai Metro network now has 8 lines with another 4 under construction. The trains are fast, cheap and fairly user-friendly with most signs also in English, but the trains can get very packed at rush hour. Fares range from ¥3 to ¥9 depending on distance. Automatic ticket vending machines take ¥1 or ¥0.5 coins and notes (some of the machines at Xujiahui and People's Square will take a public transportation card so that you can buy multiple tickets with one card). Most stations on lines 1-3 will also have staff selling tickets, but on the newly-completed lines 6, 8, and 9 ticket puchasing is all done by machine with staff there only to assist in adding credit to cards or if something goes wrong. You can now transfer between lines freely with a single ticket (except at Shanghai Railway Station and at Yishan Rd where a subway pass/Shanghai Public Transportation Card is required for transfer). The metro can use Shanghai's public transportation card (non-contact). Be careful; certain stations exist on two different lines with the same name but are located in different places (Yishan Rd- Line 3/9 and line 4 are separate stations- transfer between these stations is only possible with a subway pass; Pudian Rd- line 4 and line 6; go to either Century Ave. or Lancun Rd. to transfer between these lines; Hongkou Football Stadium, Line 3 and Line 8- transfer is only possible with a subway pass)
If there are seats available but more passengers boarding than seats, be prepared to see a mad dash (literally) for the available seats. It's no use scolding anyone as everybody behaves like that, so just go with the flow. Pickpockets are likely to strike at this moment, so be careful.
Taxi is a good choice for transportation in the city, especially off-peak hours. It is affordable (¥11 for the first 3km) and saves you a lot of time, but try to get your destination in Chinese characters as communication can be an issue. As Shanghai is a huge city, try to get the nearest intersection to your destination as well since even addresses in Chinese are often useless. Drivers, while generally honest, are sometimes genuinely clueless and occasionally out to take you for a ride. Always insist on using the meter and, if your fare seems out of line, demand a printed receipt before paying. If you feel you have been cheated or mistreated by the driver, you (or a Chinese-speaking friend) can use the information on the printed receipt to raise a complaint to the taxi company about that particular driver. The printed receipt is also useful to contact the driver in case you have forgotten something in the taxi and need to get it back.
If you come across a row of parked taxis and have a choice of which one to get in to, you may wish to check the driver's taxi ID card that is posted next to or near the meter on the dash in front of the front passenger seat. The higher the number, the newer the driver, thus the likelihood that your driver will not know where he or she is going. Taxi driver ID numbers between 10XXXX and 12XXXX are likely to be the most experienced drivers (just make sure to match the picture on the ID card with that of the driver). A number of 27XXXX to 29XXXX is probably going to get you lost somewhere. Another way is to check the number of stars the driver has. These are displayed below the driver's photograph on the dashboard in front of the passenger seat. The amount of stars indicates the length of time the driver has been in the taxi business and the level of positive feedback received from customers, and range from zero stars to five. Drivers with one star or more should know all major locations in Shanghai, and those with three stars should be able to recognize even lesser-known addresses. Remember that it takes time to build up these stars, and so don't panic if you find yourself with a driver who doesn't have any - just have them assure you that they know where they are going and you should be fine.
If you need to cross from one side of the Huangpu River to the other by taxi, especially from Pudong (浦东) to Puxi (浦西), you may want to make sure your driver will make the trip, and knows where he or she is going. Some drivers only know their side of the town and will be as lost as you are once they leave their side of town. Taxis are notoriously difficult to get on rainy days and during peak traffic hours, so plan your journeys accordingly. As the crossings between Pudong (浦东) and Puxi (浦西) are often jammed with traffic, taking a taxi may be a more expensive and less time-efficient alternative to using the Metro to cross. It may be better to take the Metro between both sides, and then catch a taxi on the side that your final destination is on.
Taxi colors in Shanghai are strictly controlled and indicate the company the taxi belongs to. Turquoise taxis operated by Dazhong (大众), the largest group, are often judged the best of the bunch. Another good taxi company, "Qiangsheng" (强生), uses gold-colored taxis. Watch out for dark red/maroon taxis, since this is the 'default' color of small taxi companies and includes more than its fair share of bad apples. Also private owned taxis (You can recognize them easily as they have an 'x' in their number plate and may not be the standard Volkswagen Santana used by most taxi companies) are among them. The dark red/maroon taxis will also go "off the meter" at times and charge rates 4x-5x the normal rate - especially around the tourist areas of the Yuyuan Gardens. Bright red taxis, on the other hand, are unionized and quite OK, furthermore there are more 3-star and above taxi drivers working for this company. The dark-green taxis cover suburban areas only and are limited to the district they are called in, but their meters start at ¥9 so they're somewhat cheaper if you're not trying to get downtown (rule of thumb- if you're trying to go somewhere within the Outer Ring highway, don't get one).
If possible, try to avoid using ¥100-bills to pay for short rides. Taxi drivers are not keen on giving away their change, and it is not uncommon to get counterfeit smaller notes for change.
By sightseeing bus
There are several different companies offering sightseeing buses with various routes and packages covering the main sights such as the Shanghai Zoo, Oriental Pearl TV Tower, and Baoyang Road Harbor. Most of the sightseeing buses leave from the Shanghai stadium's east bus.
Shanghai is a good city for walking, especially in the older parts of the city across the Huangpu from Pudong. Of course, given the large population, you should expect heavy concentrations of pedestrians and vehicles, but that is part of the excitement. Crossing large roads, in particular, can get hairy and it's advisable to follow the locals.
Driving is definitely not recommended in Shanghai, especially in downtown areas. Not only do you have to cope with seemingly perpetual traffic jams, but also Chinese driving habits which can be described as atrocious at best. Bicycles and pedestrians are also all over the place and with every driver swerving left and right to avoid them, especially at junctions, the traffic situation is very chaotic. It is also not unheard of for cyclists, motorcyclists or pedestrians to suddenly dash in front of a car without any warning. Driving anywhere in China is not for the faint hearted and even more so in Shanghai. In short, do not drive if you can help it and make use of public transport instead.