Login to OpenCart's Admin area and go to Extensions > Extensions
Choose Payments from the Choose the Extension Type filter
Scroll the page and search for Khalti and click on green + button on the right side to install the plugin.
Click on the blue button with pencil icon to configure the plugin.
Place your Public and Private keys provided by Khalti and finish the Plugin installation.
include <script src="https://khalti.s3.ap-south-1.amazonaws.com/KPG/dist/2020.12.17.0.0.0/khalti-checkout.iffe.js"></script> inside <head></head> tags on your themes header file which is located on catalog/view/theme/YOUR_THEME_NAME/template/common/header.twig