“I know I have to show my stuff to an agent or a publisher in order to get published, but then can’t they steal it from me?”

What is it with noobs and paranoia?  When they should be wracking their brains working on their craft, all they spend time on is worrying that someone is out to rip them off.  Now, I am not naive and yes, there are thieves in this world, but there are some things a writer has to keep in mind.  Primary among them is this: You can’t copyright an idea.  Repeat after me: You can’t copyright an idea.
So you send out your original work with the “highly original” plot of boy meets girl, boy loses girl, boy gets girl in the end.  You get rejections.  Now you see another book — yes, ONE other book — that came out from that same publisher or repped by that same agent, and lo and behold, it actually used that same plot, the plot that you, yes you, Genius, created from whole cloth.  The thieves!

The point here is, your “original idea” probably wasn’t as original as you thought and someone wanting to make that argument could easily take your claim and turn it on its head by finding some other work that looks eerily similar to yours, making you look like the plagiarist.  Ideas cannot be copyrighted because very few of them are truly original.
Also, before the paranoia sets in, remind yourself of this: When you are a noob, publishers know they can get you for pennies on the dollar.  Thus, there is no financial incentive for ripping you off.  If they gave your idea to Stephen King, it would cost them millions, while if they published your book under your name, it would cost them a couple thousand.  Who’s fooling who?

Don’t be afraid to show off your work.  Take your work to writer’s groups and workshops.  Show it to other writers and editors who are willing to read it (very few are, so when you find such a sucker, thank your lucky stars and go for it).  Query agents and when they ask to see it, send it to them that very second.  Do not think twice about any of this.  Do not give or send anyone some cockamamie “release” of some sort, demonstrating your amateurity.  Some larger agencies, in fact, send YOU a release, asking you to promise not to be a litigious dodo by coming after them if you see them repping some other project that in your self-centered, delusional mind is a “copy” of your work.

Work on your craft.  Get as much feedback as possible on your work.  Once you have it where you want it, get it out to as many places as possible in order to have it published and put before the public.  Send it to anyone and everyone who wants it, without unrealistic fears of theft of intellectual property.  Remember: You should only BE so lucky as to be talented enough that someone would want to steal from you.