Obviously you have to supply the information from that file in a way that ftp understands. There are a number of ways to run ftp in a script. This first one assumes you have stored the info from the file into shell variables within your script.
ftp -n $servername <<!
user $username $password
ftp commands
!
If you're storing ftp login information in a file, you may as well store it in the .netrc file. Basically, this file tells ftp what login information to use to connect to a specified machine. Lines in the file have the form ..
machine servername login username password password
Do a man netrc for full info.
If you do this, then, in your script you can say either
ftp servername <<!
ftp commands
!
or
echo "ftp commands
carriage returns important
between commands" | ftp servername
HTH.
Greg.