magento 2 getCollection code example
Example: magento 2 get collection
$om = \Magento\Framework\App\ObjectManager::getInstance();
$productCollection = $om->create('Magento\Catalog\Model\ResourceModel\Product\Collection');
$collection = $productCollection->addAttributeToSelect('*')->load();