To do this, the plugin need to load a javascript into the page that will open the popup and then you need to load a "template" into that window and then render the view. The template is a HTML file.
This is the basic concept. It's not easy and will required some time to tweek it...