score:9
Hotels are private property, but typically have areas open to the public, such as lobbies, restaurants, and bars. This depends greatly on the hotel: a 12-room roadside motel or a remote luxury resort is going to notice you sitting in the lobby fairly quickly and may not have any amenities open to non-guests, while a large urban hotel will have many people passing through and more public areas.
In the specific case of the Ritz Carlton Shanghai, there's the Flair Rooftop Lounge and Restaurant, described by its operators as "Chinaβs highest rooftop bar." It looks like a nice view. There are a number of other rooftop bars in Shanghai as well. Such facilities are for customers, and you'd generally be expected to purchase food or drink (at rooftop bar prices; you're paying for that view) to hang out there.