Pope Benedict XVI has warned of the dangers of secularism and of "do it yourself" religion, on the final day of his visit to his native Germany.
The Pope dismissed secularism and consumer-style religion
He urged an estimated 1m young people at an outdoor Mass near Cologne to hold fast to the core values of their faith.
Young Catholics should point people towards Jesus Christ in a Europe turning away from God, he urged.
In a key speech later, he set out a blueprint for the Church's future, acknowledging the problems facing it.
"Wrinkles and shadows" had obscured the face of the whole church he told about 80 Catholic bishops, an apparent reference to the scandals caused by paedophile priests.
He told them he acknowledged the dramatic shortage of priests in Germany.
Catholic morals and ethics were in constant decline, he said, urging a future where the Church remained truly young in spirit while not pandering to youth.
The BBC's David Willey in Cologne says it was a basically optimistic yet unusually realistic vision for the future of the Church.
At the earlier Mass, held on the Church's World Youth Day, crowds stretched back as far as the eye could see, the BBC's Jane Little reports.
Many had camped out all night.
The Pope told the crowds there were dangers in people finding their own religious routes.
"If it is pushed too far, religion becomes almost a consumer product," he said.
"People choose what they like, and some are even able to make a profit from it.
"But religion constructed on a 'do-it-yourself' basis cannot ultimately help us," he said.
"Help people to discover the true star which points out the way to us: Jesus Christ."
The Pope has said he hopes his trip will help to kick-start "a wave of new faith among young people".
Earlier in his visit he demonstrated his emphasis on cross-faith relations, by addressing Muslim leaders and visiting a synagogue.
Pope Benedict flew out of Cologne airport on Sunday evening, ending his first foreign trip since becoming Pope in April.
The World Youth Day festival, started by the late Pope John Paul II, is held in a different part of the world every three years.
The next one will take place in Sydney, Australia, in 2008, the Pope announced at the end of the Mass.