Access to the template file of a plug-in

maybe dirty, but it works:

$slug = $_SERVER['REQUEST_URI'];
$slug = explode("https://wordpress.stackexchange.com/", $slug);
$slug = array_filter($slug);
$slug = end($slug);
if ($slug == 'myplugin') {
    include(__DIR__.'/theme/index.php');
    exit;
}

File not found.