I was reading Mankiw and it showed variation of demand/supply curve with external factors. However, in all the cases the curves only shifted but didn't change in shape. What I am wondering is why the slope of these curves don't change?
Well, it's just a simplification. You can make a demand curve non-linear if you want to, but it doesn't serve any particular pedagogical function to do so and Mankiw is just trying to make the reader understand the intuition behind basic concepts.
I think you also want to know why a shock only shifts the curve, not its slope. Well, slopes of these curves have a certain meaning. The slope of a demand curve is related with consumer preferences, for example. An income shock is not particularly relevant to consumer preferences (not in the simple models Mankiw presents, at least, it's not like you can't model preferences like that), so it shouldn't change the demand curve's slope, only shift it. That is, people consume more (or less, depending on the shock) of a certain good at the same price.
The slope of a supply curve has an intimate relation with the economy's cost structure. Why should a supply shock - such as an earthquake - alter the curve's slope?