There are a couple of ways to put a small model ship inside of a bottle. The simplest way is to rig the masts of the ship and raise it up when the ship is inside the bottle. Masts, spars, and sails are built separately and then attached to the hull of the ship with strings and hinges so the masts can lie flat against the deck. The ship is then placed inside the bottle and the masts are pulled up using the strings attached to the masts. The hull of the ship must still be able to fit through the opening. Bottles with minor distortions and soft tints are often chosen to hide the small details of the ship such as hinges on the masts.
Alternatively, with specialized long-handled tools, it is possible to build the ship inside the bottle.