Both do, when you run it (chmod +x file.sh) by ./file.sh it uses the interpreter which can be sh, bash, perl, whatever, if you call it with sh file.sh, it will be run by that instance of the shell you create, and #!/path/to/interpreter is treated as a comment.
Hmmm, I can be wrong, though