Although the question is already having a selected answer there is no harm in providing another one.
1)Yes Hindu Shastras praise the act of constructing temples as an extremely virtuous one.Few such Puranic references are already mentioned in the selected answer.Here are few more from the Agni Purana:
Even a thought of constructing a Temple or a Water Body is adequate to
demolish sins of long standing nature and to actually accomplishing
the task is like establishing a right to reach Vaikuntha. The devotee
who completes the temple construction also redeems the sins of his
previous generations; indeed, his ‘pitaras’ would secure instant
relief from the torments of hells and qualify for substantial
dispensations.The person(s) responsible for this deed of extraordinary
merit is eligible for ‘Yagna Phal’, ‘Samasta Tirthta Snaana Phal’, and
‘veera phal’or death on battle fields. If a miser takes up the deed of
Temple renovation, let alone construction, would in his own life time
qualify the fulfillment of his dream-like aspirations of muliplying
his assets. The construction of even an ‘Ekayatan’ or single one room
temple would attain Swargaloka
Even when children for fun or playfulness build temples with sand
would also qualify for salvation. Persons who undertake repairs, let
alone construct temples new, are also eligible for attaining Mukti.
Those who are responsible for constructing temples of Vishnu, Shiva,
Surya or Devi become residents of those very Lokas and more
significantly their family members too share the same benefit.
Lord Yama Dharmara Raja addressed the ‘Yamadootas’ and said: ‘Never
bring human beings to ‘Narakas’ who constructed temples, or set up
Idols of Devas, or were engaged in regular Pujas there................Never even look at those who built ‘Mandirs’ of Bhagavan of any name like Vishnu/ Shiva/ Shakti and other Forms or even the progeny or relatives of those illustrious devotees as there is no question of bringing those to Narakas at all. Dharmaraja said:
Ishtakachaya vinyaaso yaavantyaabdaani tishthati, taadvarsha sahasraani tatkarturdivi samsthitih / Pratimaakrud Vishnu lokam
sthaapako leeyatey Harou, Devasadyaprati kruti pratishthaakruttu
gocharey--(The person who constructed the Temple should reside in Swarga for so many years as the totality of bricks used in it. He who made the Pratima would attain ‘Vishnuloka’and he who made the temple and established the Pratima would live in that loka forever.
Similarly,the Skanda Purana says:
Like wise anybody establishes a Siva Linga and a Temple Complex would
surely reserve a place in Siva Loka . Those who clean up any Siva
Temple with a broom would be free from ailments and illness
2&4)Hindu Shastras will never force someone into doing something but the Scriptures do mention the need of visiting Temples on certain occasions.Even the oldest Dharma Shastra ,the Manu Smriti,says this:
4.153. But on the Parva-days let him go to visit the (images of the) gods, and virtuous Brahmanas, and the ruler (of the country), for the
sake of protection, as well as his Gurus.
3)The rules are many regarding Temple worship.You can find few glimpses of them in the Agni Purana page itself.Rules of worshiping in homes are also many and are contained in the Smritis & other Scriptures.
5)The Puranas mention about temples on numerous occasions.So,without doubt temples originated from Shastras and not from human mind.
The following references of temples are from Manu Smriti itself:
8.248. Tanks, wells, cisterns, and fountains should be built where boundaries meet, as well as temples,
4.46.(let him not evacuate bowels) Nor on ploughed land, in water, on an altar of bricks, on a mountain, on the ruins of a temple, nor ever
on an ant-hill,
9.280. Those who break into a (royal) storehouse, an armoury, or a temple, and those who steal elephants, horses, or chariots, he shall
slay without hesitation.
3.180 (Food) given to a seller of Soma becomes ordure, (that given) to a physician pus and blood, but (that presented) to a temple-priest is
lost, and (that given) to a usurer finds no place (in the world of the