Shopping cart

How to Use code in external file/script in Magento 2

In order to use code in external file/script in Magento 2, the topic covers an example which will use the existing in the Magento 2 root folder. You can set the file’s name to abc.php, then let’s open domain.com/shell.php to inject the below code: