>how would you appoint a new captain, where would the captain snuggle stuff on board ship, would the merchant have some sort of agent.
Well, I don't know about snuggling, but for smuggling there are chests. The captain's is the largest, but even sailors might have (depending on type of ship and type of sailor) some sort of box. I know this because there are accounts of captain and crew alike doing personal business in ports all along the pilgrim route to the Holy Land in the later Middle Ages. In any case, the captain's quarters are pretty much sacred and no one is going to look there.
But smuggling is rather a modern notion. The point of control is not at the ship but at the market. As foreigners (I'm assuming a foreign port), all business transpires at a city-controlled market, usually right down on the docks. The smuggling would happen when an individual either bribed local officials to look the other way, or managed to evade them somehow. Think of it more like getting through airport security, except not as efficient.
Merchants usually operated through agents. Sea travel was chancy, and you didn't want the head of the firm to drown. In fact, very often it was the case that the captain himself was the agent. He did the buying and selling, being given a share (along with the crew) in all proceeds, so it was in his own interest to cut good deals. And not to get busted for smuggling.
The investors invested not merely in the goods but in the ship itself, which came with the captain, who in turn was responsible for recruiting the crew. As investors, the merchants determined the goods and also could put passengers aboard. The charge from the merchants would be general: take these goods and sell them as best you can, and return with the following items, at best prices. When the items came back and were sold, the proceeds were divided.
A ship's captain typically went with the ship, but the merchants were essentially shareholders and could decide on someone different. There were exceptions. Some of the Italian towns--Genoa and Venice are specific cases I know--the ships were under the authority of the city council and so it was the city that selected captains. If a military operation were in hand, they would choose an admiral from the nobility. He commanded the fleet, but even on his own ship there might be a captain to run it. The admiral chose when to engage or retreat, and in consultation with the captains chose battle plans.
hth!