"Well, I went out this morning to do some shopping. It's my dad's birthday next week, so I thought I better buy him something." Yes, the full form is I had better buy him something.
'I had better do something' means I think it's advisable for me to do something.