Tapeworms cannot reproduce inside your body, it is right that it sheds bodyparts with eggs which normally end up in your faeces. Alas, some of the eggs may stick to your rectum resulting in an itchy feeling. If you scratch yourself, the eggs may stick to your fingers. When you put your fingers into your mouth without washing them, the eggs will get into your body, there they evolve into a new tapeworm. This does not necessarily infest your stomach, the new worms can break throught the wall of the stomach. It then nests in muscles, growing to a little pea-sized worm, this causes severe damage. Alas, the tapeworm itself is not really harmful, if you google it you get many adds that propagate losing weight through these worms.
Some tapeworms are also said to have a positive effect because they want to protect their host from illness or allergies.
Anyway, tapeworms are already used to treat obesity.