Shanghai is not part of a province or state. It is one of China's four directly administered municipalities (alongside Beijing, Tianjin, and Chongqing), reporting straight to the central government.