How to Display custom product collection at Magento frontend

Magento

Lets say we want to display our custom product collection at our custom controller/action inside our custom Magento module,
Please check below example to get product collection :-


From above code we have changed layout to 1 column, filled content with catalog/product_list type block and added catalog/product_list_toolbar with page/html_pager inside.
Now if you have noticed that  Mage_Catalog_Block_Product_List code, you will notice that Mage_Catalog_Block_Product_List "listens" for certain class properties when adjusting Mage_Catalog_Block_Product_List_Toolbar instance:



<?php
class Mage_Catalog_Block_Product_List extends Mage_Catalog_Block_Product_Abstract
{
    protected function _beforeToHtml()
    {
        $toolbar = $this->getToolbarBlock();
        $collection = $this->_getProductCollection();
        if ($orders = $this->getAvailableOrders()) {
            $toolbar->setAvailableOrders($orders);
        }
        if ($sort = $this->getSortBy()) {
            $toolbar->setDefaultOrder($sort);
        }
        if ($dir = $this->getDefaultDirection()) {
            $toolbar->setDefaultDirection($dir);
        }
        if ($modes = $this->getModes()) {
            $toolbar->setModes($modes);
        }
        $toolbar->setCollection($collection);
        $this->setChild('toolbar', $toolbar);
        Mage::dispatchEvent('catalog_block_product_list_collection', array(
            'collection' => $this->_getProductCollection()
        ));
        $this->_getProductCollection()->load();
        return parent::_beforeToHtml();
    }
}
?>

Please check Below Helper code:-

 

<?php
 
class Mmartinovic_Productlist_Helper_Data extends Mage_Core_Helper_Abstract
{
    public function getAvailableOrders()
    {
        return array(
            'price' => $this->__('Price')
        );
    }
 
    public function getProductCollection()
    {
        $rootCategoryId = Mage::app()->getStore()->getRootCategoryId();
 
        $collection = Mage::getModel('catalog/category')
            ->load($rootCategoryId)
            ->getProductCollection()
            ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
            ->addMinimalPrice()
            ->addFinalPrice()
            ->addTaxPercents()
            ->addUrlRewrite($rootCategoryId);
 
        Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
        Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($collection);
 
        return $collection;
    }
 
}
?>
-->