Or, take rail transit Line 9 (Yanggao Middle Road-Songjiang South Station) to Century Avenue Station, then transfer to Line 2 (Pudong International Airport-Xujingdong) to Nanjing East Road Station, and then transfer to Line 10 (New jiangwan city-Hongqiao Railway Station) to get off at Shanghai Library Station.
Both methods are ok, but the first one is closer. The journey takes about 35 minutes. Ticket price: 4 yuan.