A very good way to allow a child to get used to you is to arrange for several visits while the parent(s) are home. That way the child can interact with you without being alone with you. Also if the child sees that 'mommy' and 'daddy' trust you, they are more likely to trust you as well
I like the above ideas...you could also bring enough if something to spread out and share...you start plating and the child will come around and join you...just enjoy playing together silently and have them make the first move....it could be stacking blocks, large legos, crayons (if an older 2 and out of the mouth stage).
visit the child while their parents are there play around maybe they go to the store and come back so the child will know it is ok for he or she to be alone with you.... oh and find out the childs favorite things to do. ... have fun
Do not force your way into the child's space. Do something interesting on the other side of the room and let the child's curiosity draw him to you. Then share the moment with the child. Use lots of different happy facial expressions.
The best way to get a young child to bond immediately, is through food. Since food and eating is most of their world at this age, they will respond to it right away. Find out what the 2 year old likes and bring it with you or make it while babysitting and share it with them.You will be amazed at how quickly this can work.
Next, find out what they like to do, such as play with a specific toy and give the toy to them. You can show them fun ways to play with the toy, but if they hand the toy to you, be sure to always give it back to them or they may become upset. Have fun! : D