How do I call plans in PHP (or Java)?

Yeah I know, users can create their own div wrapper around playplans (https://stackideas.com/docs/payplans/administrators/customizations/pricingpage).

But I'm looking for a way to call already generated Payplans.
You have them in Menu by link :

index.php?option=com_payplans&view=plan&task=subscribe&plan_id=0&group_id=0


So I tried

<?php
$FileContents = file_get_contents("*your domain*/index.php?option=com_payplans&view=plan&task=subscribe&plan_id=0&group_id=0");
echo $FileContents();
?>


It does work but also gives me footer and menu, because I call for a whole page. =)
There should be an easier way to call them same way menu does...?

This section can only be seen by users with a valid subscription.
If you have a valid subscription, please login now

Support is
Online

The support team is online and will be able to answer your inquiries. Please stay calm, follow the rules and do not cross post.

We will attend to you as soon as we can.

Your time
Stack Ideas time