When should we resort to root canal treatment?

When should we resort to root canal treatment?