Arduino Program Codes for HC-05 Bluetooth Module

Good day everyone. We are trying to create a device which connects with another bluetooth enabled device automatically without using user interface. The codes we've done so far is not working at all. The program logic should allow the HC -05 Module to connect with a paired bluetooth device automatically as we turn it on.. We believe that serial interface is a way to do this but we cant figure out how to do so. Can anyone help us in building the codes please. Thank you in advance for your kind responses. :).