Correct way to change the active Drupal theme programmatically?
Drupal 6 solution: 

You want to make sure you change the global $custom_theme variable fairly early in page execution.

global $custom_theme;
$custom_theme = 'garland';