There is extensive debate amongst the Poskim regarding opening a bottle which has a cap attached by a ring. When the cap is twisted, the ring separates and falls to the neck of the bottle.
There are three opinions amongst the Poskim. Some Poskim prohibit opening such bottles on Shabbat. They hold it violates Shabbat, since the act of twisting the top essentially creates the cap. Before, it was a seal of the bottle, and now it is a separate vessel.
Some Poskim, such as Rav Shlomo Zalman (Jerusalem, 1910-1995), distinguish between metal and plastic bottle tops. The metal caps have a ring which is an integral part of it, attached by perforation. Twisting it open creates a new entity. The plastic ones are not a part of the cap itself, and do not constitute a problem.
On the other hand, some Poskim, such as the Menuhat Ahaba (Rabbi Moshe Halevy, Israel, 1961-2001), say that neither variety is problematic, since it was always considered a cap.
Hacham Bension (Or Lesion 2:27:8) also permitted opening bottles, even with the metal cap. He based his argument on the fact that the manufacturing process of the bottle tops first sets the cap, as a separate entity, on the bottle and only then seals the cap with the metal ring. If one would stop the assembly line in mid-process, he would see a distinct stage in which the bottle has a viable cap, without the ring. Halachically, this means that twisting the bottle top does not form the cap. It was always there; the ring is merely a seal, which may be broken according to Maran in 314, who permits breaking the seal of a barrel to access the wine.
While there is room to be lenient, it is praiseworthy to open bottles before Shabbat.
One may open all bottle tops on Shabbat, although it is praiseworthy to open them before Shabbat.