Render form in template
You can add search box in a preprocess function in your template.php:

&lt;?php
/*
 *  Preprocess page.tpl.php to inject the $search_box variable back into D7.
 */
function MYTHEME_preprocess_page(&amp;$variables){
  $search_box = drupal_render(drupal_get_form('search_form'));
  $variables['search_box'] = $search_box;
}


Then you just need to print the variable in your page.tpl.php:

&lt;?php print $search_box; ?&gt;