There are two major conceptual problems with this creature.
The first is neatly summarized by one of my favorite quotes on the subject, from Sid Meier's Alpha Centauri:
Remember, genes are not blueprints. This means you can't, for example, insert "the genes for an elephant's trunk" into a giraffe and get a giraffe with a trunk. There are no genes for trunks. What you can do with genes is chemistry, since DNA codes for chemicals.
Taking your example, photosynthesis: this is a very complex chemical process with a lot of moving parts. There isn't just one gene that says "this being is photosynthetic" or even "this part of the being is photosynthetic" - photosynthesis is the cumulative result of many different genes, potentially scattered throughout its genome in totally different areas.
This relates to the other conceptual problem, which is that it's not at all obvious what each individual gene does. They create proteins in specific sequences, and those protein chains can go off and do other things. But outside of the complete cellular environment, it can be extremely difficult to predict the purpose or effect of a specific gene or sequence of genes. Humans can do it, because we have the luxury of examining countless other organisms and sharing our findings. A specific creature dealing with a specific new gene sequence it hasn't encountered before has no idea what it does, except perhaps by experimentation.
Oddly enough, the basic idea of gleaning genetic information from other creatures is totally sound - viruses and prokaryotes do it all the time, and it's possible (though not at all clear) that it happens in larger organisms too. However, this isn't a conscious act on the part of the virus; it's more a consequence (sometimes helpful, sometimes presumably unhelpful) of existing in an environment with other DNA around. The problem is doing it on demand and making sure that an organism grabs enough genetic information - which can be widely scattered, remember - from the subject to mimic a large-scale process like photosynthesis.
One possibility is that the creature has some kind of expendable cell - skin cells, perhaps, which by their nature are numerous, die off readily, and can be shed when they've served their purpose - that acts as a testbed for new genetic material. Most of the time, the gene-transferred skin cells die. When they hit on something advantageous, they thrive (briefly), tripping a biological mechanism that propagates the new genes throughout the creature. (In essence, this is normal natural selection, but within the confines of a single creature rather than a population.) However it would be limited to changes that are at the cellular level, rather than the level of organs: it might confer resistance to heat, or some kind of toxin, but it wouldn't give you wings.