Checking the documentation from popup ninja plugin on how to open the popup from a link, the only available option is how to open from a blog post. But if you want to add the link in your website using php, you need to use the wordpress function do_shortcode. The documentation doesn’t show how to add a do_shortcode with content between the tags.
To open the popup with php, simply get the popup ID and use the code bellow. Just remember to change the text for your desired one.
< ?php echo do_shortcode( '[ninja-popup ID=1234]'.'text to open popup'.'[/ninja-popup]' ); ?>