Keeping chocolate shards from melting can be achieved by tempering the chocolate properly before making the shards. This involves heating and cooling the chocolate to specific temperatures in order to stabilize its crystalline structure. Once tempered, store the shards in a cool place away from direct sunlight or any source of heat to prevent them from melting.