I would like to add that V(て form)+しまいます adds a feeling of regret to what you're saying. Usually, it's used in the past tense as what you are regretting has already been done. So, using your example:
宿題を忘れた。I forgot my homework.
宿題を忘れてしまいました。I forgot my homework (and I feel regret over it).
しまいます is a verb as well, so it exists in plain form しまう and plain past form しまった. And, it is colloquially shortened to ちゃった.