How to create plugin/ page that reads from database

To query a second database you can use the wpdb object like explained here.
This can be a local or extern database. You don’t need to create a plugin.