Perform the following steps to successfully steal without getting caught:
Step One Find an area out of the line of sight of all the surrounding NPC's.
Step Two Find a good spot to hide in and save your game. Step Three Click the right stick while you have selected the item you want to steal, but do not press the A button to steal it.
Step Four This allows you to safely carry the item to your designated hiding spot. Step Five Now crouch and, when it says [HIDDEN], you can steal it without losing reputation, or having an NPC attack you.
You may lose karma so attempt this once to make sure you won't have an undesired karma effect. An excellent place for this trick would be the Van Graff energy weapon shop.You can do this with any of the items on the counter and there is a hiding spot on the back side of the room.