magento 2 get first collection item code example
Example: magento getcollection get first
// this gets all the products
$productCollection = Mage::getResourceModel('catalog/products_collection');
// this line gets just the first product
$firstItem = $productCollection->getFirstItem();