There are intermediaries who broker deals on commodities and they usually use something called a Letter of Credit for moving the money. I once helped broker a deal for a million pounds of sugar in Estonia and it is not exactly like stopping by WalMart for some new socks-- it took two months for the first deal and there was a lot of contract negotiation and consulting a lawyer at $400/hour.
They wouldn't lend money for sugar since they are dealing with very large amounts of product. A typical sugar cargo ship can haul 13,000 tons of sugar and a 20' shipping container would be about 20 tons. 20 tons is a miniscual amount in the sugar business. With cocoa, there are many variables and they normally export pods to be processed.
With a tiny amount of sugar, the shipping could more than the cost of the sugar.