use following code
query_posts(array(‘orderby’ => ‘rand’)); if (have_posts()) : while (have_posts()) : the_post();