Long ago, before money, people engaged in a barter system. This was a tedious and time-consuming process. Imagine owning a pig, and that you wanted eggs. You would have to find eggs, whose owner wanted a pig!
Bartering was gradually replaced when people realized they could store certain items which they knew others would accept as payment later on. Instead of waiting for an egg owner who wanted pigs, you could get your eggs from someone who may accept shells, which you obtained in exchange for the pig, as payment (as the ancient Egyptians did).
The reason why shells were chosen as a medium of exchange was due to its uniqueness and that it could not easily be made from scratch. You will just need a couple of shells to acquire your milk, eggs, onions, etc. and thus shells are rather convenient to carry. Also, shells may be somewhat durable, which would allow for people to hold them for extended periods of time, unlike food, which decomposes especially when wet.
But shells would not remain as a practicable medium of exchange. Shells, like diamonds, could not really be divided in various quantities for trading in uniform sizes. They become less desirable upon being cut in non-divisible ways.
Shells also vary in quality; one shell has a different appearance, density, etc. from others, and people will assign different values to different shells, making for very inconsistent pricing.
Gradually, it was precious metals, which had their uses in the making of certain goods, which people stored for purposes of exchange. Of these precious metals, it was gold and silver that emerged as universal forms of money. It is remarkable how gold and silver evolved into money among civilizations in different continents, independent of each other.