Usually, Korn and Bash shells have a "restricted shell" mode. Getting to a restricted shell might be as easy as typing rsh (avoid "remote shell" - definitely not a good idea in 2012) or rbash. But I'm not sure what you want.
The FTP protocol might allow a client to send arbitrary commands (with QUOTE), but the FTP server (ftpd) probably shouldn't just execute anything it gets. FTP servers have a long history of security problems, part due to the FTP protocol itself, part due to sloppy programming or subtle errors.
Using ftp (the client program) you might have the ability to do a file listing on the ftpd (server program) machine, or you might have the ability to get ftpd to change directories, but even if you assign a restricted shell to the user ID "ftp", you won't get the ftp client to do arbitrary things on the FTP server (the machine).
You might get what you want by setting up a user ID with a restricted shell, and then allowing SSH access by that user ID. I can't tell from your question.