She had painted the door before the dog scratched it.
В данном предложении используется Past Perfect, чтобы показать, что действие завершилось до другого момента в прошлом.
Ответ: She had painted the door before the dog scratched it.