My iPhone is shutting down with 18% of battery?

And battery also dies so fast. How do I fix it? I don't have any applications installed.

Sounds like you need a new battery. I got the battery replaced in one of our work phones for about $30.

The percentage indicator can be very inaccurate and gets worse on tired batteries. Lithium polymer batteries, like all rechargeable, do wear out.

You failed to state which iPhone you have, but it would not be unusual for 4, 4s and early 5 models to now need replacements (although my early iPhone 4 still has a good original battery; there's considerable variance). Most 5c and 5s models and later should still be fine. But check the Apple website; there have been recalls for some models which have had premature battery failures. If yours is one of those affected then Apple may offer a free out of warranty battery swap (often done by exchanging your phone for a refurbished example of the same model).