I have the following:
$products = Mage::getModel(\'catalog/product\') ->getCollection() ->addAttributeToSort(\'id\', \'RAND()\') ->addAt
Refer to this question: query magento limit + order by rand() and clockworkgeek's answer:
$collection->getSelect()->order(new Zend_Db_Expr('RAND()'));