Attach a 5-star widget to a custom form How do you add a FiveStar widget to a (non-node) form using hook_form_alter?
$path = drupal_get_path('module', 'fivestar');      
  drupal_add_js($path . '/js/fivestar.js');
  drupal_add_css($path . '/css/fivestar.css');

  $rating = votingapi_select_single_result_value(array(
        'entity_id' =&gt; YOURENTITY_ID,
        'entity_type' =&gt; 'YOURENTITY_TYPE',
        'tag' =&gt; 'vote',
        'function' =&gt; 'average',
   ));
   $form['votes'] = array(
      '#markup' =&gt;  theme('fivestar_static', array('rating' =&gt; $rating, 'stars' =&gt; 5, 'tag' =&gt; 'vote')),
   );