After figuring this out for myself today, I thought I would post in case anyone else comes across the same problem.
1. In MailChimp, ensure the email you want to export is saved as a template.
2. Select Edit – Export as HTML.
When exporting a HTML template, the styles do not get inlined automatically which means your email will not render properly in email clients like Gmail. You can fix this by using MailChimp’s tool to inline the CSS.
3. Copy your code from the HTML download into MailChimp’s Inline Tool.
4. Click convert, download the code and you’re done.