Part of the reason why what you're doing won't work is because
(shell) actually launches a new inferior shell, which may or may not then be the target for
(insert-string); in any case, the most it'd accomplish is to exit the inferior shell. The Emacs wiki has an unanswered question on the subject, which is relatively rare over there on any subject; between that, and the general disinterest evinced by non-batch-mode Emacs in communicating with its parent process by any means, I tend to doubt what you're attempting is possible.
That doesn't, though, mean that you can't get the desired result -- after all, you need not have Emacs communicate with its parent process; if you replace your shell process with Emacs, then whatever terminal you're using will exit at the same time Emacs does, in the same fashion as any terminal when the process attached to its pty finishes.
The method will vary depending on your shell, but in Bash, zsh, and probably tcsh as well (assuming anyone still uses it), you need simply preface your Emacs invocation with
exec -- if you usually say
emacs -nw, instead say
exec emacs -nw, &c.
This assumes you're invoking Emacs directly from the shell, as seems likely. If you use (for example) a shell script to invoke Emacs, this won't work, because
exec will replace the shell process executing the script, rather than the one bound to your pty; in that case, just
exec the shell script instead, and you should still get the result you're after unless your script does something really weird, in which case you should update your question to include it and someone will probably be able to figure something out that'll work.