Pretender corresponds to the verb to intend, so you’d use it in all contexts where to intend would apply. The only trick with this verb is not mistaking it for the verb to pretend (fingir) - otherwise, it’s straightforward.
- O que pretendes fazer? = What do you intend to do?
- O prisioneiro pretendia escapar. = The prisoner intended to escape.