To get products from the database, you need to use Magento 2's repository design pattern. Each module can be bundled with it's own repositories, and the Product Catalog module is not any different.
You can use dependency injection in your class to access the repository. A working example would look...