How to theme the $content variable's contents?
If all you want to do is change the order, you do that in the edit content/manage fields form where you can drag and drop the fields in whatever order you want them to be output.

If that's not exactly what you want, you can also change how they are displayed in the "display fields" form.

If all of the above doesn't do exactly what you want, you can print out each field however you want inside the template itself, eg, instead of printing $output, you can print out each field you want when and how.

So, if for example, you have a text field called field_description, you can output it by putting a  print $node-&gt;field_description[0]['safe']; in there since the entire $node is available inside the template to play with.

To see all there is to work with in your specific case, a quick drupal_set_message('&lt;pre&gt; . print_r($node,true) . '&lt;/pre&gt;'); in your template will show you lots of information.