Shanghai is a wonderful city for riding. Most roads have a dedicated cycling lane and the city is completely flat. Pudong in particular has wide boulevards perfect for cycling and weekend mountain bike trips are possible in the nearby hills of Zhejiang.
Factory Five are part bike store, part mechanic on Jiangsu Lu. Lots of bikes and parts are available here, particularly for fixed gear road bikes.
Affordable mountain bikes are available at Decathlon or at Giant retailers around town; expect to pay between 1000 - 4000 RMB.