How long does chocolate keep if you melt it then set in a different shape and put an airtight container?

The shelf life of melted chocolate that has been set in a different shape and placed in an airtight container can vary depending on factors such as the type of chocolate, the temperature at which it is stored, and whether it contains any additional ingredients.

Here's a general guideline for how long melted chocolate can keep:

- Milk chocolate: Up to 2-3 weeks when stored at room temperature (around 70°F/21°C). If stored in a cool, dry place, it can last up to 4 weeks.

- Dark chocolate: Up to 3-4 weeks at room temperature and up to 6 weeks when stored in a cool, dry place.

- White chocolate: Up to 2-3 weeks at room temperature. It is best to keep white chocolate refrigerated, where it can last up to 6 weeks.

Chocolate should be stored in an airtight container to protect it from moisture, air, and light, which can cause it to lose flavor, texture, and color over time. Additionally, it is important to avoid storing chocolate in areas that are too warm, as this can cause the chocolate to melt or become soft and lose its shape.

It's important to note that if the melted chocolate contains additional ingredients such as nuts, fruits, or spices, the shelf life may be reduced due to the potential for these ingredients to spoil or react with the chocolate.

As a general rule, it's best to consume melted chocolate within a few weeks to ensure the best quality and flavor. If you are unsure about the freshness of melted chocolate, it's always best to discard it to avoid potential foodborne illnesses.