The monster effect "If this card attacks a Defense Position monster, before damage calculation: Shuffle that monster into the Deck" is a Trigger Effect. (It does not target.)
The monster effect "Shuffle that monster into the Deck" always activates when "Ehren, Lightsworn Monk" itself attacked a face-up Defense Position monster or a face-down Defense Position monster. (If the opponent's monster was in face-down Defense Position, it activates after that monster is flipped face-up.)
The monster effect "Once per turn, during your End Phase: Send the top 3 cards of your Deck to the Graveyard" is a Trigger Effect. (It does not target. It activates only once during the End Phase.)
It activates even if there are 2 or fewer cards remaining in your Deck. (In that case, send your entire Deck to the Graveyard.)
These TCG rulings were issued by Upper Deck Entertainment and have since been deemed unofficial by Konami. They were previously considered official and can still be correct, as long as they follow the official gameplay rules, or unless Konami has issued a ruling that says otherwise. References: 
“Ehren, Lightsworn Monk” can use its effect to return face-up and face-down Defense Position monsters to the owner's Deck.
When "Ehren, Lightsworn Monk's" effect is applied, Damage Calculation does not occur. Neither player receives Battle Damage to their Life Points.
Note that “Ehren, Lightsworn Monk” does not say “without flipping the monster face-up”. The effect of “Ehren, Lightsworn Monk” is applied after the monster is flipped face-up, but before damage calculation. If the Defense Position monster was face-down and has a Flip Effect, the Flip Effect will activate and resolve normally after it is returned to its owner's Deck.
If “Ehren, Lightsworn Monk” attacks a face-down Defense Position monster while “Final Attack Orders” is active, the monster is not returned to its owner's Deck because it flips face-up and immediately shifts to Attack Position.
These TCG rulings were issued by Upper Deck Entertainment and have since been deemed unofficial by Konami. They were previously considered official, but may or may not necessarily hold true nowadays.
If you do not have enough cards to send to the Graveyard remaining in your Deck when resolving the effect of a “Lightsworn” monster or “Judgment Dragon,” all cards remaining in your Deck are sent to the Graveyard. For example, if you control “Jain, Lightsworn Paladin” and its effect activates during your End Phase when you have only 1 card remaining in your Deck, that card will be sent to the Graveyard.