I have a halfling PC. I want him to count as an animal-type creature (at least briefly) so I can have him benefit from his 'Friend to the Animals' class feature (which he may have from a level of Oracle or from UMD+a Soothsayer's Raiment if actual levels in Oracle are a problem for some reason). How can I do this with the least investiture of character resources (e.g. class levels, gp)?
The cheapest long-term way is definitely to pay for a casting of Polymorph Any Object. Unlike other Polymorph spells, PaO was not altered to prevent type-changing during the move from 3.5 to Pathfinder. It's an 8th level spell, which means you can access it in your local metropolis and it can turn you into any Small mammal permanently at the low, low cost of 1,200 gp.
PaO has some pretty severe downsides, though, when used this way. First of all, even the permanent version can be dispelled, and 1,200 gp can be a bit much to be paying every time that happens if you've no real way of stopping that. Second of all, it actually changes you into the new creature, which could be very problematic given the drawbacks animals have as chassis.
The best way, if you can get access to it, is Instant Enemy1. The principle issue here is getting a favored enemy option with which to select 'animal' as the type to count yourself as. If you just need the change to last a short time and are okay with it taking place in town, you can just use a Potion of Instant Enemy (animal), which should be easily purchased in any large town or larger settlement, and which will run you 1050 gp. If you want it to be available differently, you'll need something else.
If your DM uses the 2nd method for generating resonant wayfinder/ioun stone properties, you can get yourself favored enemy on a roll of 10. A wayfinder with such a power would be worth 250gp + 25gp for a Dull Gray stone (a total of 275 gp). You'd then need a method of getting access to the spell so as to be able to cast it.
Depending on class and UMD investment, a Page of Spell Knowledge (at 9,000 gp) may be a good solution.
Alternatively an intelligent item can cast the relevant spell 3 times per day at 18,000 gp or at will with a +1 spell level metamagic addition for 56,000 gp.
1. Instant Enemy does not actually give you the animal type (as you should be able to see from reading the linked spell description). What Instant Enemy does is let you treat yourself (well, any non-favored-enemy creature really) as if you were a certain kind of creature for all purposes, including type. That's enough for your purposes, but you still aren't technically the creature type you count as for any and all purposes. Also, obviously, you don't stop being humanoid under the spell or anything like that.
Creature types are not easily changed, you need an effect that specifically says you change a creature's type, like an animal becoming a Familiar:
A familiar is an animal chosen by a spellcaster to aid him in his study of magic. It retains the appearance, Hit Dice, base attack bonus, base save bonuses, skills, and feats of the normal animal it once was, but is now a magical beast for the purpose of effects that depend on its type.
Or a monk's Perfect Self capstone ability:
At 20th level, a monk becomes a magical creature. He is forevermore treated as an outsider rather than as a humanoid (or whatever the monk’s creature type was) for the purpose of spells and magical effects.
Note that this only changes a monk's type for the purpose of spells and magical effects, for everything else he is still a humanoid, or whatever his original type is.
Polymorph effects (normally) don't change your creature type. This (unwritten) rule causes a lot of confusion on how things should actually work in Pathfinder, but has been confirmed many times by the devs, as seen here, by James Jacobs (Creative Director), and here, by Jason Bulmahn (Lead Developer):
Stardust is correct. Polymorph spells do not change your type.
Type: The creature’s type changes to plant (augmented).
Type: The creature’s type changes to undead (augmented).
However, to this date, there are no templates that can change a creature's type to animal.
Polymorph spells are out of question because the general rules for Transmutation (Polymorph) specifically call out that you assume a creature's form, but does not mention changing your creature type. This can be seen on this answer here on the site.
Polymorph: a polymorph spell transforms your physical body to take on the shape of another creature. While these spells make you appear to be the creature, granting you a +10 bonus on Disguise skill checks, they do not grant you all of the abilities and powers of the creature. Each polymorph spell allows you to assume the form of a creature of a specific type, granting you a number of bonuses to your ability scores and a bonus to your natural armor.
No polymorph spell contradicts this general rule, not even Polymorph Any Object, Undead Anatomy or Plant Shape. That means that regardless of the form chosen (even if it's that of a rock) you are still a creature of your original type (most likely a Humanoid).
One rule that certainly enforces this is the Android's trait Cellular Match. Normally an android counts as both a humanoid and construct creature, even under the effects of a polymorph. This traits allow the character to change his form on a celullar level, removing the construct type for the purpose of effects based on a creature's type for the duration of the polymorph effect.
Reincarnation can change a creature's type, since Aasimar (native outsider) and Ghoran (plant) are on the list. However, there are no animals on that list yet, nor any signs that there will ever be, since GM's are encouraged to create new lists for different creature types.
Magic Jar (and effects based on magic jar) is perhaps the easiest way to change your creature type. And even this use of the spell is questionable. But what allows this is the following:
You keep your Intelligence, Wisdom, Charisma, level, class, base attack bonus, base save bonuses, alignment, and mental abilities.
Since your creature type is not among the things that are kept, we can assume you will become a creature of the same type as the new host, along with all abilities and special qualities of the new creature with the exceptions listed.
But again, this could simply be an oversight by the developers. Specially since magic jar could be used on undead creatures or a dragon.
Honestly, i find it difficult to we will see effects that specifically change a creature's type to the animal type, because unless the effect mentions that their mental stats are not changed, the creature type animal will make them have 1-2 intelligence. Otherwise they cannot be an animal, with the exception for animal companions.
Intelligence score of 1 or 2 (no creature with an Intelligence score of 3 or higher can be an animal).
The Wilding Feat, must be taken at 1st level.
You were touched by nature at an early age and share a kinship with wild creatures. Your body might bear animalistic features, such as bestial ears or a tail, or your presence may be subtly unlike that of others.
Prerequisites: Any neutral alignment, must be taken at 1st level.
Benefit: You gain the druid’s wild empathy ability, using your character level as your druid level. If you have one or more levels in a class that grants wild empathy, you gain an additional +3 bonus on wild empathy checks. You are treated as an animal for the purpose of harmful mind-affecting effects that target animals (such as charm animal).
Special: A character who has this feat can select the Animal Soul or Aspect of the Beast feats without meeting the prerequisites.
While this isn't exactly what you were looking for, in the games I have played we rule it that you effectively count as both humanoid and animal.
Neither of the two sources mentioned in the question give 'Friend to the Animals' Feat, nor does the feat require you to be animal like at all. If being able to make friends with animals without using magic casting was what you wanted, then this feat alone lets you do that. By taking Animal Soul afterwards you remove all negative aspects of the Wilding feat while retaining all the good ones.
Your close bond with an animal allows you to ignore harmful magic that cannot affect your wild side.
Prerequisite(s): Animal companion or mount class feature.
Benefit: You can choose not to allow spells and effects to effect you if they would not be capable of affecting both your original creature type and the animal creature type.
Original Text (prior to errata): “You can allow spells and effects that affect animals, animal companions, and special mounts to affect you, even if the spells do not normally affect creatures of your type. For example, you could cast animal growth or reduce animal on yourself, even though those spells normally affect only animals. An ally could cast raise animal companion on you to bring you back from the dead. An opponent could not cast charm animal or dominate animal on you unless you chose to allow the spell to affect you as if you were an animal.”