Allowing your rice krispie treats to cool for about 5 minutes before adding the M&M's will keep them from cracking and melting. You can also store your M&M's in the fridge before using.