How to write a shell script for rsync to remote server?

Hello,

Can you help me to write a shell script for rsync a folder from my server to remote server ?

i do this in ssh by this command :

rsync -avz -e ssh /copy/me/ login@serverip:/where/to

i want have a shell script that do this command.

and you know that this command ask remote server root password this is important that shell script input password too.

Thanks.