In my shell environment I have aliases and custom functions. When I am in an instance of emacs (I always use emacs -nw) and I execute a shell command (M-!
Have a read through http://www.gnu.org/software/bash/manual/bashref.html#Bash-Startup-Files
For non-interactive shells, the only file that is sourced is the value of the BASH_ENV environment variable. You invoke emacs like BASH_ENV=~/.bashrc emacs if emacs will use bash for shell commands -- some programs specifically use "/bin/sh"