hey Amit,
Check out the Shopify API docs on OAuth authentication. They provide a PHP Wrapper to help you out with the integration.
Once you can handle authenticating users coming from Shopify, the rest is pretty straight forward. Make a call to their API to charge the users (provided your app isn't free), and perhaps make a call to setup a Webhook for when the user uninstalls your app.
Best of luck!