Is it permissible on Shabbat to open a door to a room or a cupboard, if there is a Mukseh item hanging from it? Do we consider the door in this case a "Bassis" ("base") to the Mukseh item, such that it may not be moved?
The Be’ur Halacha (Rav Yisrael Meir Kagan of Radin, 1839-1933), in Siman 277, raises this question, and, based on the Yerushalmi, suggests that it might, indeed, be forbidden to open a door on Shabbat if there is something Mukseh hanging from it. Others, however, disagree, claiming that a door serves primarily to allow access to the room or the closet, and not as a means of swinging the item or items hanging from it. Therefore, we do not view the door as a "base" for the Mukseh item that hangs from it, and it may be moved on Shabbat.
A common application of this issue is opening refrigerator doors, which generally have shelves which might have Mukseh items – such as inedible food – stored in them. According to the second view cited above, the presence of Mukseh items in the shelves does not pose a Halachic problem, since we view the door as serving primarily the refrigerator, and not the items in its shelves. According to the Be’ur Halacha, however, it would appear that one should not open the door, as it is regarded as a "Bassis" for the Mukseh objects.
In truth, however, opening the refrigerator would, in most cases, be permissible even according to the Be’ur Halacha. As long as the shelves in the door contain additional items, besides the Mukseh item, and the Mukseh item is not the most significant item contained in the shelves, we do not regard the door as a "Bassis" for the Mukseh item, even according to the Be’ur Halacha. Most refrigerator doors contain a variety of items, and not only Mukseh items, and thus generally speaking, it is permissible to open a refrigerator door even if it contains some Mukseh, according to all opinions.
A problem may arise, however, with regard to tool closets and the like. The door to a tool closet may have tools such as a hammer and nails stored in its shelves, and thus the door would, according to the Be’ur Halacha, be regarded as Mukseh.
Summary: It is permissible to open a door to a refrigerator or cupboard on Shabbat even if it has shelves that contain Mukseh, as long as it also contains non-Mukseh items, which is generally the case. It is questionable, however, whether one may open on Shabbat the door to a tool closet if tools are stored in shelves in the door.