How to configure Google captcha in a pop up form?

I want to implement Google captcha to my forum but I want it to pop up when a certain button is clicked.
Can someone understand me and please help me?

Thank You.